apache / apache/datafusion-sqlparser-rs
`LIKE ... ESCAPE <escape_char>` should accept an empty string
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
Currently, we use `Option` to represent `escape_char`, which cannot represent three case. We should introduce a new enum to represent that.
```rust
enum EscapeChar {
NotSpecified,
Empty,
Escape(char),
}
```
to pass the case:
https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE:~:text=it's%20also%20possible%20to%20select%20no%20escape%20character%20by%20writing%20escape%20''
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named. Start by tracing the Rust representation of `escape_char` from `Option` through parsing, then inspect how PostgreSQL `ESCAPE ''` is represented and tested; done means the empty, unspecified, and character cases remain distinct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rust
- Domain
- compilers, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100