apache / apache/datafusion-sqlparser-rs
AS Keyword added by default even if not specified on original SQL statement
- 主要言語
- Rust
- スター
- 3.5k
- フォーク
- 772
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 17
説明
Hi all,
I am writing you after @TylerBrinks suggested me to open a discussion on the issue mentioned in title.
Basically I am using the C# porting version of Rust one (thanks Tyler) using the Generic dialect in an Oracle
scenario. I know that is not the perfect usage but what happens is that when I parse a SQL statement that do not
have the AS clause specified the dialect automatically add it which causing Oracle error when trying to execute it.
I have tried to create a new dialect for Oracle but I didn't find a way (at least in the c# version) where to override
the default AS clause inserted. I proposed @TylerBrinks some changes to his porting code but he objected that was better to open a discussion here on this topic.
Please I am open to any solution like:
1- Write a new Oracle dialect class giving me the possibility to override the default AS clause
2- Remove default AS clause
Thanks in advance
Regards
Luigi
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、AS句を付けない文について Generic dialect のパースを再現し、次に、方言固有のエイリアスのレンダリングがどこで選択されるかを追跡します。parser が生成した SQL を Oracle の要件と比較し、Oracle dialect または設定可能な AS の動作のどちらが適切かを判断します。選択した動作がカバーされ、Oracle のケースで不要な AS句が出力されなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust, sql
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100