apache / apache/datafusion-sqlparser-rs
Representing infix `REGEXP`
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
[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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the sqlparser-rs AST and expression parsing for existing infix operators, then compare how MySQL and SQLite syntax is represented. The issue does not name files or tests, and completion criteria for supporting an infix function are not defined; clarify the intended AST shape and affected dialect behavior before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- compilers, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100