You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9703ff4
Browse filesBrowse the repository at this point in the historyBrowse files
fix: parse a bracketed operand at the start of a PARTITION BY list (#2878)
`SELECT SUM(x) OVER (PARTITION BY (1 + a) / 2) FROM t` failed with a
ParseException at the `/`. The four PARTITION BY sites chose between
`LOOKAHEAD(3) ComplexExpressionList()` and a bracketed list
`"(" ComplexExpressionList() ")"`. The probe scans into `Expression()`,
whose binary operators live in a Java loop the scan cannot see, so it
failed on `( 1 +`, the bracketed alternative won, parsed `(1 + a)` as the
whole list and then met `/`.
The bracketed alternative only won when the probe failed, and the parse
then failed too, so dropping it changes nothing that parsed before. All
four sites now call `ComplexExpressionList()` directly.
0 commit comments