apache / apache/datafusion-sqlparser-rs

Representing infix `REGEXP`

未关闭
#863 8 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
3.5k
派生
772
平均合并
4 天 9 小时
30 天内合并 PR
17

描述

[MySQL](https://dev.mysql.com/doc/refman/8.0/en/regexp.html) & Sqlite have unusual regex operators:

```sql
SELECT 'a' REGEXP '^[a-d]';
```

i.e. it's an infix function.

We are big users (and big fans!) of `sqlparser-rs` in PRQL We have a PR https://github.com/PRQL/prql/pull/2458 for implementing regex in the other dialects.

Could I ask — is there some way of representing an infix function in `sqlparser-rs` AST?

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查 sqlparser-rs 的 AST 和表达式解析,了解现有的中缀运算符,然后比较 MySQL 和 SQLite 语法的表示方式。该 issue 未指定文件或测试,也未定义支持中缀函数的完成标准;在实现之前,请明确预期的 AST 形状以及受影响方言的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust, sql
领域
compilers, databases
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。