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時間
- マージ済み PR(30日)
- 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
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100