`SHOW TABLES ... LIKE 'p' LIMIT n` is displayed with the `LIKE` after `LIMIT`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Start with parse_show_stmt_options in the parser, where the suffix LIKE filter is read right after show_in, then compare it with Display for ShowStatementOptions, which writes the fields in a different order. Check the round-trip tests for SHOW TABLES and SHOW DATABASES with a ClickHouseDialect. Done when SHOW TABLES FROM system LIKE '%user%' LIMIT 2 displays in the same order it was parsed and reparses with the filter intact, and the Snowflake infix case still round-trips.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
With dialects that take the LIKE filter as a suffix (ClickHouse, MySQL, Generic, ...), Display writes it after LIMIT, and the output reparses as a LIKE inside the limit expression:
SHOW TABLES FROM system LIKE '%user%' LIMIT 2 (ClickHouseDialect)
-> displays as: SHOW TABLES FROM system LIMIT 2 LIKE '%user%'
-> reparses with LIMIT (2 LIKE '%user%') and no filter
SHOW DATABASES LIKE '%de%' LIMIT 2
-> displays as: SHOW DATABASES LIMIT 2 LIKE '%de%' (same AST change)
SHOW TABLES LIKE 'x%' LIMIT 2 (SnowflakeDialect, infix filter)
-> round-trips (fine)
ClickHouse puts the pattern before LIMIT: SHOW [FULL] [TEMPORARY] TABLES [{FROM | IN} <db>] [[NOT] LIKE | ILIKE '<pattern>'] [LIMIT <N>] ... (https://clickhouse.com/docs/sql-reference/statements/show).
parse_show_stmt_options reads the suffix filter right after show_in, before STARTS WITH / LIMIT / FROM, but Display for ShowStatementOptions uses "{like_in_infix}{show_in}{starts_with}{limit}{from}{like_in_suffix}".
Tested on main ce12f1f6 (also 0.63.0 and 0.58.0).
Found with a property-based fuzzer (round trip check); I used AI assistance for triage and verified every case above.
- Ngôn ngữ chính
- Rust
- Star
- 3.5k
- Fork
- 805
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 116
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/datafusion-sqlparser-rs
-
Redshift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/datafusion-sqlparser-rs#2959 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Redshift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/datafusion-sqlparser-rs#2958 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PostgreSQL
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/datafusion-sqlparser-rs#2862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PostgreSQL
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
apache/datafusion-sqlparser-rs#2861 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PostgreSQL
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/datafusion-sqlparser-rs#2858 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/datafusion-sqlparser-rs
Issue tương tự
-
area:schema documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ElectronicWave/Elemental#252 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dekobon/big-code-analysis#1887 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Shell中文符号输入异常Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày