apache / apache/datafusion-sqlparser-rs
AS Keyword added by default even if not specified on original SQL statement
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 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 方言中的解析过程,然后跟踪方言特定的别名渲染是在何处选择的。将 parser 生成的 SQL 与 Oracle 的要求进行比较,并确定采用 Oracle 方言还是可配置的 AS 行为更合适。当所选择的行为已得到覆盖,并且 Oracle 情况下不会输出不需要的 AS 子句时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust, sql
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100