apache / apache/datafusion-sqlparser-rs

Clickhouse tuples not supported

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

描述

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
```

贡献指南

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

调研方向

首先使用 ClickHouse 示例复现报告的 ParserError,从 `SELECT t.1 FROM x` 开始,并将其与可正常工作的 `tupleElement(t, 1)` 形式进行比较。扩展支持,直到列出的 tuple、array 和链式访问查询都能成功解析,然后为这些示例添加或运行 parser coverage。

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

评估

技术栈
clickhouse, rust
领域
databases
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

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