Skip to content

Commit 06de4db

Browse files
Copilotmathiasrw
andauthored
Add WITH ROLLUP and WITH CUBE syntax to fix #292 (#2303)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mathiasrw <[email protected]>
1 parent 5062a4b commit 06de4db

File tree

3 files changed

+660
-371
lines changed

3 files changed

+660
-371
lines changed

src/alasqlparser.jison

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,10 @@ GroupClause
10671067
: { $$ = undefined; }
10681068
| GROUP BY GroupExpressionsList HavingClause
10691069
{ $$ = {group:$3}; yy.extend($$,$4); }
1070+
| GROUP BY GroupExpressionsList WITH ROLLUP HavingClause
1071+
{ $$ = {group:[new yy.GroupExpression({type:'ROLLUP', group: $3})]}; yy.extend($$,$6); }
1072+
| GROUP BY GroupExpressionsList WITH CUBE HavingClause
1073+
{ $$ = {group:[new yy.GroupExpression({type:'CUBE', group: $3})]}; yy.extend($$,$6); }
10701074
;
10711075

10721076
GroupExpressionsList

0 commit comments

Comments
 (0)