Commit 85a49a6
committed
fix: clear error for qualified column names in EXCLUDE clause
When a user writes `f.* EXCLUDE (f.col)` instead of `f.* EXCLUDE (col)`,
the parser previously consumed only the table qualifier (e.g. `f`) as the
identifier and then hit the `.` unexpectedly, producing a confusing error
like "Expected: `,` or `)`, found `.`".
This commit detects the qualified-name pattern in
`parse_optional_select_item_exclude` and returns an actionable error:
EXCLUDE does not support qualified column names,
use a plain identifier instead (e.g. EXCLUDE (account_canonical_id))
Applies to both the single-column (`EXCLUDE col`) and multi-column
(`EXCLUDE (col1, col2)`) forms.
Fixes repro: `SELECT f.* EXCLUDE (f.account_canonical_id, f.amount) FROM t AS f`1 parent 982068e commit 85a49a6
2 files changed
Lines changed: 55 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17901 | 17901 | | |
17902 | 17902 | | |
17903 | 17903 | | |
17904 | | - | |
| 17904 | + | |
| 17905 | + | |
| 17906 | + | |
| 17907 | + | |
| 17908 | + | |
| 17909 | + | |
| 17910 | + | |
| 17911 | + | |
| 17912 | + | |
| 17913 | + | |
| 17914 | + | |
| 17915 | + | |
| 17916 | + | |
17905 | 17917 | | |
17906 | 17918 | | |
17907 | 17919 | | |
17908 | 17920 | | |
| 17921 | + | |
| 17922 | + | |
| 17923 | + | |
| 17924 | + | |
| 17925 | + | |
| 17926 | + | |
| 17927 | + | |
| 17928 | + | |
| 17929 | + | |
17909 | 17930 | | |
17910 | 17931 | | |
17911 | 17932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17395 | 17395 | | |
17396 | 17396 | | |
17397 | 17397 | | |
| 17398 | + | |
| 17399 | + | |
| 17400 | + | |
| 17401 | + | |
| 17402 | + | |
| 17403 | + | |
| 17404 | + | |
| 17405 | + | |
| 17406 | + | |
| 17407 | + | |
| 17408 | + | |
| 17409 | + | |
| 17410 | + | |
| 17411 | + | |
| 17412 | + | |
| 17413 | + | |
| 17414 | + | |
| 17415 | + | |
| 17416 | + | |
| 17417 | + | |
| 17418 | + | |
| 17419 | + | |
| 17420 | + | |
| 17421 | + | |
| 17422 | + | |
| 17423 | + | |
| 17424 | + | |
| 17425 | + | |
| 17426 | + | |
| 17427 | + | |
| 17428 | + | |
| 17429 | + | |
| 17430 | + | |
17398 | 17431 | | |
17399 | 17432 | | |
17400 | 17433 | | |
| |||
0 commit comments