apache / apache/datafusion-sqlparser-rs

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

Đang mở
#2,432 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
3.5k
Fork
772
Merge trung bình
4 ngày 9 giờ
Pull request đã merge (30 ngày)
17

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust, sql
Lĩnh vực
databases
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.