You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/14 02:08:31 UTC

[GitHub] [shardingsphere] jingshanglu commented on a change in pull request #7778: Add SQLServer parser select aggregation clause, support except & intersect.

jingshanglu commented on a change in pull request #7778:
URL: https://github.com/apache/shardingsphere/pull/7778#discussion_r504357612



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DMLStatement.g4
##########
@@ -73,11 +73,15 @@ multipleTableNames
     ;
 
 select 
-    : unionClause
+    : aggregationClause
+    ;
+
+aggregationClause
+    : selectClause ((UNION (ALL)? | EXCEPT | INTERSECT) selectClause)*
     ;
 
 unionClause
-    : selectClause (UNION (ALL | DISTINCT)? selectClause)*
+    : selectClause (UNION (ALL)? selectClause)*
     ;

Review comment:
       Can these two rules be combined? Since the reference in the subquery is unionClause. The subquery and SELECT should have the same semantics,right?




----------------------------------------------------------------
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:
users@infra.apache.org