Commit 4188b0a
committed
fix: reserved keywords as column names with trailing comma detection
When trailing commas are enabled (ClickHouse/BigQuery/Snowflake), keywords
like FORMAT, SETTINGS, SAMPLE in RESERVED_FOR_COLUMN_ALIAS were incorrectly
treated as clause terminators even when used as column names.
Now checks the token after the reserved keyword: if followed by ',' or
another reserved keyword (like FROM), it's a column name, not a clause start.
Fixes: SELECT database, table, format, sample FROM t1 parent 7441dd6 commit 4188b0a
2 files changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3519 | 3519 | | |
3520 | 3520 | | |
3521 | 3521 | | |
3522 | | - | |
3523 | | - | |
3524 | | - | |
3525 | | - | |
3526 | | - | |
3527 | | - | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
3528 | 3536 | | |
3529 | 3537 | | |
3530 | 3538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1622 | 1622 | | |
1623 | 1623 | | |
1624 | 1624 | | |
| 1625 | + | |
| 1626 | + | |
1625 | 1627 | | |
1626 | 1628 | | |
1627 | 1629 | | |
| |||
0 commit comments