apache / apache/datafusion-sqlparser-rs

Duplicate column in CREATE TABLE statement

未關閉
#668 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
3.5k
分支
772
平均合併
4 天 9 小時
30 天內合併 PR
17

描述

SQLite raises a parser error with the following DDL:
```sh
sqlite> CREATE TABLE test (
...> x TEXT,
...> x TEXT
...> );
Parse error: duplicate column name: x
```
But `sqlparser` doesn't:

```sh
% cargo run --example cli ddl.sql --sqlite
...
Round-trip:
'CREATE TABLE test (x TEXT, x TEXT)'
Parse results:
[
CreateTable {
...
```
Is this kind of checks considered out of scope ?
Thanks.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

使用 SQLite DDL 和 `cargo run --example cli ddl.sql --sqlite` 命令重現這項差異。先追蹤 CREATE TABLE 陳述式的解析方式,接著判定是否應拒絕重複的欄位名稱。當這個輸入的 parser 行為已決定,並且有一致的涵蓋時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust, sql
領域
databases
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。