strongduanmu commented on code in PR #29001:
URL: https://github.com/apache/shardingsphere/pull/29001#discussion_r1389291523


##########
parser/sql/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/type/OracleDMLStatementVisitor.java:
##########
@@ -669,6 +669,23 @@ public ASTNode visitParenthesisSelectSubquery(final 
ParenthesisSelectSubqueryCon
         return visit(ctx.selectSubquery());
     }
     
+    private void setSelectCombineClause(final SelectCombineClauseContext ctx, 
final OracleSelectStatement result, final OracleSelectStatement left) {
+        for (int i = 0; i < ctx.selectSubquery().size(); i++) {
+            CombineType combineType;
+            if (null != ctx.UNION(i) && null != ctx.ALL(i)) {
+                combineType = CombineType.UNION_ALL;
+            } else if (null != ctx.UNION(i)) {
+                combineType = CombineType.UNION;
+            } else if (null != ctx.INTERSECT(i)) {
+                combineType = CombineType.INTERSECT;
+            } else {
+                combineType = CombineType.MINUS;
+            }
+            result.setCombine(new 
CombineSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), 
left,

Review Comment:
   Why call setCombine in foreach? I think combine should be a multi-level 
nested structure.



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