apache / apache/datafusion-sqlparser-rs
Clickhouse `WITH <expression> AS <identifier>` syntax
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
Hey 👋
The `WITH AS ` (doc [here](https://clickhouse.com/docs/en/sql-reference/statements/select/with)) does not seem to be supported.
For instance, this command with the `ClickHouseDialect` does not work (nor with `GenericDialiect`):
```
WITH concat(prefix_addr, '/', prefix_len) AS prefix SELECT prefix FROM table
```
```
sql parser error: Expected: (, found: prefix at Line: 1, Column: 46
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the provided query with ClickHouseDialect and GenericDialect, using the reported parser error at line 1, column 46 as the entry point. Follow the WITH parsing path to determine how the expression-plus-identifier form is handled; done means the example parses successfully for the relevant dialects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100