EmmyMiao87 commented on a change in pull request #1292: Support Grouping Sets, 
Rollup and Cube to extend group by statement
URL: https://github.com/apache/incubator-doris/pull/1292#discussion_r292804954
 
 

 ##########
 File path: fe/src/main/cup/sql_parser.cup
 ##########
 @@ -3111,9 +3114,52 @@ where_clause_without_null ::=
   {: RESULT = e; :}
   ;
 
-group_by_clause ::=
-  KW_GROUP KW_BY expr_list:l
+grouping_set ::=
+  LPAREN RPAREN
+  {: 
+    ArrayList<Expr> list = Lists.newArrayList();
+    RESULT = list; 
+  :}
+  | LPAREN expr_list:l RPAREN
   {: RESULT = l; :}
+  ;
+
+grouping_set_list ::=
+  grouping_set:l
+  {:
+    List<ArrayList<Expr>> list = Lists.newArrayList();
+    list.add(l);
+    RESULT = list;
+  :}
+  | grouping_set_list:list COMMA grouping_set:l
+  {:
+    list.add(l);
+    RESULT = list;
+  :}
+  ;
+
+grouping_element ::=
 
 Review comment:
   ```suggestion
   grouping_elements ::=
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to