wgy8283335 commented on a change in pull request #11259:
URL: https://github.com/apache/shardingsphere/pull/11259#discussion_r667556678



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DMLStatement.g4
##########
@@ -622,8 +622,34 @@ whereClause
     : WHERE expr
     ;
 
+hierarchicalQueryClause
+    : CONNECT BY NOCYCLE? expr (START WITH expr)?
+    | START WITH expr CONNECT BY NOCYCLE? expr
+    ;
+
 groupByClause
-    : GROUP BY orderByItem (COMMA_ orderByItem)*
+    : GROUP BY groupByItem (COMMA_ groupByItem)* havingClause?
+    ;
+
+groupByItem
+    : rollupCubeClause | groupingSetsClause | expr
+    ;
+
+rollupCubeClause
+    : (ROLLUP | CUBE) LP_ groupingExprList RP_
+    ;
+
+groupingSetsClause
+    : GROUPING SETS LP_ (rollupCubeClause | groupingExprList) (COMMA_ 
(rollupCubeClause | groupingExprList))* RP_
+    ;
+
+groupingExprList
+    : expressionList (COMMA_ expressionList)*
+    ;
+
+expressionList
+    : exprs
+    | LP_ expr? (COMMA_ expr?)* RP_

Review comment:
       Do you think this is better?
   `exprs | LP_ expr? (COMMA_ expr)* RP_`




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to