Commit 7a62b45
Support binary expression WITH clauses like (SELECT ...) + (SELECT ...) AS name
- Remove special case for `(SELECT ...) AS name` in parseWithClause, letting it
go through the expression parser which handles binary expressions
- Add ScalarWith flag to WithElement to distinguish between:
- "name AS (SELECT ...)" - standard CTE syntax
- "(SELECT ...) AS name" - ClickHouse scalar WITH syntax
- Update EXPLAIN output to use correct format based on ScalarWith flag
Fixes 03212_variant_dynamic_cast_or_default/stmt51.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent a273941 commit 7a62b45
File tree
4 files changed
+26
-37
lines changed- ast
- internal/explain
- parser
- testdata/03212_variant_dynamic_cast_or_default
4 files changed
+26
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
1599 | 1600 | | |
1600 | 1601 | | |
1601 | 1602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1202 | 1212 | | |
1203 | 1213 | | |
1204 | | - | |
1205 | | - | |
| 1214 | + | |
1206 | 1215 | | |
1207 | 1216 | | |
1208 | 1217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | 1450 | | |
1472 | 1451 | | |
1473 | | - | |
1474 | | - | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1475 | 1457 | | |
1476 | 1458 | | |
| 1459 | + | |
1477 | 1460 | | |
1478 | 1461 | | |
1479 | 1462 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
0 commit comments