apache / apache/datafusion-sqlparser-rs
Clickhouse tuples not supported
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
Clickhouse tuples are not supported. The following errors `ParserError("Expected: end of statement, found: .1 at Line: 1, Column: 22")`.
```
SELECT t.1 FROM x
```
This is a valid Clickhouse way of accessing tuple elements. See https://clickhouse.com/docs/sql-reference/functions/tuple-functions#tupleelement. It is some syntactic sugar to `tupleElement(t, 1)` which does work.
Request: Make the above query work, and similar ones.
```
SELECT t.1 FROM x
SELECT (1, 2, 3).2
SELECT arr[1].1 FROM t
SELECT arr[1].1.2 FROM t
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported ParserError with the ClickHouse examples, beginning with `SELECT t.1 FROM x` and comparing it with the working `tupleElement(t, 1)` form. Extend support until the listed tuple, array, and chained-access queries parse successfully, then add or run parser coverage for those examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse, rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100