Commit ac43df1
committed
Document limitation: cannot flatten OR/AND chains in EXPLAIN output
The 02711_trim_aliases test expects OR chains like "a OR b OR c" to be
flattened to or(a, b, c) with 3 children. However, tests like 01661_join_complex
expect "(a OR b) OR c" to remain nested as or(or(a,b), c) with 2 children.
Both SQL patterns produce identical parse trees due to left-associative parsing.
Our parser doesn't track explicit parenthesization, but ClickHouse's EXPLAIN
output distinguishes between them based on the original SQL syntax.
Since we cannot tell implicit grouping apart from explicit parentheses at the
AST level, any fix for 02711 would break 01661 (and vice versa).
The 02711_trim_aliases test remains in explain_todo as this is a fundamental
limitation of our parser architecture.1 parent 56cb4de commit ac43df1
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
| |||
0 commit comments