apache / apache/datafusion-sqlparser-rs
Bug: `SELECT * FROM ( SELECT * FROM APPLICATIONS.SALESFORCE.ACCOUNT) outer` fails to parse in snowflake
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 17
描述
I hit a bug where the SQL statement
```sql
SELECT * FROM ( SELECT * FROM APPLICATIONS.SALESFORCE.ACCOUNT) outer
```
failed to parse. This is because `OUTER` is part of the reserved keyword list for table aliases. https://github.com/apache/datafusion-sqlparser-rs/blob/8ccb87a8355858ccb06ffc20484657cd7980d78c/src/keywords.rs#L843-L900
Currently this list is a global but it seems like it should be dialect specific. I'm happy to work on this, but I wanted to know if the project had any opinions on how this list should be maintained at the dialect level.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先重现 Snowflake 查询并阅读 src/keywords.rs 中链接的范围,尤其要查看 OUTER 是如何分类的。然后检查解析器的方言处理,以确定应如何维护保留关键字列表。完成的标准是报告的查询能够正确解析,同时不会导致其他方言的关键字处理出现回归。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust, sql
- 领域
- compilers
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100