apache / apache/datafusion-sqlparser-rs

CTE FROM Statement should be of type ObjectName or TableFactor

オープン
#853 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
3.5k
フォーク
772
平均マージ
4日 9時間
マージ済み PR(30日)
17

説明

First of all, thanks for this awesome package!

While parsing the AST, I came Across Cte's FROM Statement:
https://github.com/sqlparser-rs/sqlparser-rs/blob/6b2b3f1f6c903bddc87ba0858b5ccdb94c5e2242/src/ast/query.rs#L337-L341

This renders as WITH ... AS ... FROM ...
While I am not sure which Database actually supports this syntax, I expected FROM to be an `ObjectName` or `TableFactor`, so basically a `Vec` instead of a single `Ident`.

I am not 100% sure this is actually a bug as I don't know which Database supports this syntax. It feels wrong though for this FROM to behave so differently.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

src/ast/query.rs の337〜341行目付近にある CTE 定義から始め、周辺の AST 型で FROM フィールドがどのように表現されているかを調べます。どの SQL 方言がこの形式をサポートしているかを確認し、他の箇所での ObjectName と TableFactor の使用方法と比較します。期待される CTE FROM 構文が一貫性のある検証済みの AST 表現を持てば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
databases
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。