apache / apache/datafusion-sqlparser-rs

CTE FROM Statement should be of type ObjectName or TableFactor

未关闭
#853 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。