Open vil1 opened 6 months ago
@nfx: is it OK for me to do the change I suggested right away?
@vil1 Given that we have changed this area quite a bit, is this issue still valid? The Snowflake grammar could still be improved quite a bit with function declarations etc. Maybe I should spend some time on Snowflake grammar @nfx ?
Is there an existing issue for this?
Problem statement
The way the
goup_by_clause
is currently expressed is such that some group types, such asROLLUP
inGROUP BY ROLLUP (x)
are incorrectly parsed as function calls.More specifically, the second branch in:
Seems to never be matched as the
ROLLUP (x)
part of the input always gets matched by thegoup_by_list
ruleProposed Solution
Reordering the branches in
group_by_clause
seems to fix the issue:Additional Context
No response