apache / apache/datafusion-sqlparser-rs

Should the `generic` dialect support numeric literals with underscore separators?

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

描述

Right now, the `generic` dialect (DataFusion's default) does not support numeric literals with separators:

```sql
DataFusion CLI v54.0.0
> select 1_000;
+------+
| _000 |
+------+
| 1 |
+------+
```

I'm wondering if the `generic` dialect should support this, just like Postgres/DuckDB/SQLite/Clickhouse, so DataFusion can use them directly without needing to switch to another dialect.

貢獻指南

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

研究方向

Start by reproducing `select 1_000;` in the DataFusion CLI and trace how the `generic` dialect tokenizes and parses numeric literals. Compare its behavior with the Postgres, DuckDB, SQLite, or ClickHouse dialects mentioned in the issue; done means the generic dialect accepts numeric separators without treating `_000` as a column name.

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

評估

技術堆疊
rust, sql
領域
databases
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
65/100

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

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