apache / apache/datafusion-sqlparser-rs
CTE FROM Statement should be of type ObjectName or TableFactor
- 主要語言
- Rust
- 星號
- 3.5k
- 分支
- 772
- 平均合併
- 4 天 9 小時
- 30 天內合併 PR
- 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