You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by to...@apache.org on 2022/06/06 15:53:09 UTC

[shardingsphere] branch master updated: Rename UnionType to CombiningType (#18204)

This is an automated email from the ASF dual-hosted git repository.

totalo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 68088191eb0 Rename UnionType to CombiningType (#18204)
68088191eb0 is described below

commit 68088191eb03f746b40ede3ab8195767f4e2a3a8
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Jun 6 23:53:00 2022 +0800

    Rename UnionType to CombiningType (#18204)
---
 .../optimizer/converter/SQLNodeConverterEngine.java    | 18 +++++++++---------
 .../statement/impl/MySQLStatementSQLVisitor.java       |  6 +++---
 .../statement/impl/OpenGaussStatementSQLVisitor.java   | 14 +++++++-------
 .../statement/impl/PostgreSQLStatementSQLVisitor.java  | 12 ++++++------
 .../constant/{UnionType.java => CombiningType.java}    |  7 ++++---
 .../sql/common/segment/dml/union/UnionSegment.java     |  4 ++--
 .../statement/dml/impl/SelectStatementAssert.java      |  2 +-
 .../cases/domain/segment/impl/union/ExpectedUnion.java |  4 ++--
 .../src/main/resources/case/dml/select-union.xml       | 18 +++++++++---------
 .../src/main/resources/case/dml/table.xml              |  2 +-
 10 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java
index 748b2db26e8..f791e5d2e69 100644
--- a/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/main/java/org/apache/shardingsphere/infra/federation/optimizer/converter/SQLNodeConverterEngine.java
@@ -29,7 +29,7 @@ import org.apache.calcite.sql.SqlSelect;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.shardingsphere.infra.federation.optimizer.converter.statement.SelectStatementConverter;
-import org.apache.shardingsphere.sql.parser.sql.common.constant.UnionType;
+import org.apache.shardingsphere.sql.parser.sql.common.constant.CombiningType;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.union.UnionSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
@@ -43,15 +43,15 @@ import java.util.TreeMap;
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class SQLNodeConverterEngine {
     
-    private static final Map<UnionType, SqlOperator> REGISTRY = new TreeMap<>();
+    private static final Map<CombiningType, SqlOperator> REGISTRY = new TreeMap<>();
     
     static {
         registerUnion();
     }
     
     private static void registerUnion() {
-        REGISTRY.put(UnionType.UNION_DISTINCT, SqlStdOperatorTable.UNION);
-        REGISTRY.put(UnionType.UNION_ALL, SqlStdOperatorTable.UNION_ALL);
+        REGISTRY.put(CombiningType.UNION_DISTINCT, SqlStdOperatorTable.UNION);
+        REGISTRY.put(CombiningType.UNION_ALL, SqlStdOperatorTable.UNION_ALL);
     }
     
     /**
@@ -65,7 +65,7 @@ public final class SQLNodeConverterEngine {
             SqlNode sqlNode = new SelectStatementConverter().convertToSQLNode((SelectStatement) statement);
             for (UnionSegment each : ((SelectStatement) statement).getUnions()) {
                 SqlNode unionSqlNode = convertToSQLNode(each.getSelectStatement());
-                return new SqlBasicCall(convertUnionOperator(each.getUnionType()), new SqlNode[]{sqlNode, unionSqlNode}, SqlParserPos.ZERO);
+                return new SqlBasicCall(convertCombiningOperator(each.getCombiningType()), new SqlNode[]{sqlNode, unionSqlNode}, SqlParserPos.ZERO);
             }
             return sqlNode;
         }
@@ -88,14 +88,14 @@ public final class SQLNodeConverterEngine {
             SelectStatement leftSelectStatement = (SelectStatement) convertToSQLStatement(leftSqlNode);
             SelectStatement rightSelectStatement = (SelectStatement) convertToSQLStatement(rightSqlNode);
             leftSelectStatement.getUnions().add(
-                    new UnionSegment(rightSqlNode.getParserPosition().getColumnNum() - 7, rightSqlNode.getParserPosition().getEndColumnNum() - 1, UnionType.UNION_DISTINCT, rightSelectStatement));
+                    new UnionSegment(rightSqlNode.getParserPosition().getColumnNum() - 7, rightSqlNode.getParserPosition().getEndColumnNum() - 1, CombiningType.UNION_DISTINCT, rightSelectStatement));
             return leftSelectStatement;
         }
         throw new UnsupportedOperationException("Unsupported SQL statement conversion.");
     }
     
-    private static SqlOperator convertUnionOperator(final UnionType unionType) {
-        Preconditions.checkState(REGISTRY.containsKey(unionType), "Unsupported unionType: `%s`", unionType);
-        return REGISTRY.get(unionType);
+    private static SqlOperator convertCombiningOperator(final CombiningType combiningType) {
+        Preconditions.checkState(REGISTRY.containsKey(combiningType), "Unsupported combining type: `%s`", combiningType);
+        return REGISTRY.get(combiningType);
     }
 }
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
index 26fa3cf9d60..61303288adc 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
@@ -136,7 +136,7 @@ import org.apache.shardingsphere.sql.parser.sql.common.constant.AggregationType;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.JoinType;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.OrderDirection;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.ParameterMarkerType;
-import org.apache.shardingsphere.sql.parser.sql.common.constant.UnionType;
+import org.apache.shardingsphere.sql.parser.sql.common.constant.CombiningType;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.constraint.ConstraintSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexNameSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment;
@@ -693,9 +693,9 @@ public abstract class MySQLStatementSQLVisitor extends MySQLStatementBaseVisitor
     
     @Override
     public ASTNode visitUnionClause(final UnionClauseContext ctx) {
-        UnionType unionType = (null != ctx.unionOption() && null != ctx.unionOption().ALL()) ? UnionType.UNION_ALL : UnionType.UNION_DISTINCT;
+        CombiningType combiningType = (null != ctx.unionOption() && null != ctx.unionOption().ALL()) ? CombiningType.UNION_ALL : CombiningType.UNION_DISTINCT;
         MySQLSelectStatement statement = null != ctx.queryPrimary() ? (MySQLSelectStatement) visit(ctx.queryPrimary()) : (MySQLSelectStatement) visit(ctx.queryExpressionParens());
-        return new UnionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), unionType, statement);
+        return new UnionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), combiningType, statement);
     }
     
     @Override
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java
index 4807718c103..3becfd89e91 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussStatementSQLVisitor.java
@@ -105,7 +105,7 @@ import org.apache.shardingsphere.sql.parser.autogen.OpenGaussStatementParser.Win
 import org.apache.shardingsphere.sql.parser.sql.common.constant.AggregationType;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.OrderDirection;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.ParameterMarkerType;
-import org.apache.shardingsphere.sql.parser.sql.common.constant.UnionType;
+import org.apache.shardingsphere.sql.parser.sql.common.constant.CombiningType;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.constraint.ConstraintSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexNameSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment;
@@ -864,24 +864,24 @@ public abstract class OpenGaussStatementSQLVisitor extends OpenGaussStatementBas
         if (null != ctx.selectClauseN() && !ctx.selectClauseN().isEmpty()) {
             OpenGaussSelectStatement result = (OpenGaussSelectStatement) visit(ctx.selectClauseN(0));
             result.getUnions().add(new UnionSegment(
-                    ((TerminalNode) ctx.getChild(1)).getSymbol().getStartIndex(), ctx.getStop().getStopIndex(), getUnionType(ctx), (OpenGaussSelectStatement) visit(ctx.selectClauseN(1))));
+                    ((TerminalNode) ctx.getChild(1)).getSymbol().getStartIndex(), ctx.getStop().getStopIndex(), getCombiningType(ctx), (OpenGaussSelectStatement) visit(ctx.selectClauseN(1))));
             return result;
         }
         return visit(ctx.selectWithParens());
     }
     
-    private UnionType getUnionType(final SelectClauseNContext ctx) {
+    private CombiningType getCombiningType(final SelectClauseNContext ctx) {
         boolean isDistinct = null == ctx.allOrDistinct() || null != ctx.allOrDistinct().DISTINCT();
         if (null != ctx.UNION()) {
-            return isDistinct ? UnionType.UNION_DISTINCT : UnionType.UNION_ALL;
+            return isDistinct ? CombiningType.UNION_DISTINCT : CombiningType.UNION_ALL;
         }
         if (null != ctx.INTERSECT()) {
-            return isDistinct ? UnionType.INTERSECT_DISTINCT : UnionType.INTERSECT_ALL;
+            return isDistinct ? CombiningType.INTERSECT_DISTINCT : CombiningType.INTERSECT_ALL;
         }
         if (null != ctx.MINUS()) {
-            return isDistinct ? UnionType.MINUS_DISTINCT : UnionType.MINUS_ALL;
+            return isDistinct ? CombiningType.MINUS_DISTINCT : CombiningType.MINUS_ALL;
         }
-        return isDistinct ? UnionType.EXCEPT_DISTINCT : UnionType.EXCEPT_ALL;
+        return isDistinct ? CombiningType.EXCEPT_DISTINCT : CombiningType.EXCEPT_ALL;
     }
     
     @Override
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java
index de71f3a4b52..a0961cc3578 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java
@@ -103,7 +103,7 @@ import org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParserBas
 import org.apache.shardingsphere.sql.parser.sql.common.constant.AggregationType;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.OrderDirection;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.ParameterMarkerType;
-import org.apache.shardingsphere.sql.parser.sql.common.constant.UnionType;
+import org.apache.shardingsphere.sql.parser.sql.common.constant.CombiningType;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.constraint.ConstraintSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexNameSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment;
@@ -832,21 +832,21 @@ public abstract class PostgreSQLStatementSQLVisitor extends PostgreSQLStatementP
         if (null != ctx.selectClauseN() && !ctx.selectClauseN().isEmpty()) {
             PostgreSQLSelectStatement result = (PostgreSQLSelectStatement) visit(ctx.selectClauseN(0));
             result.getUnions().add(new UnionSegment(
-                    ((TerminalNode) ctx.getChild(1)).getSymbol().getStartIndex(), ctx.getStop().getStopIndex(), getUnionType(ctx), (PostgreSQLSelectStatement) visit(ctx.selectClauseN(1))));
+                    ((TerminalNode) ctx.getChild(1)).getSymbol().getStartIndex(), ctx.getStop().getStopIndex(), getCombiningType(ctx), (PostgreSQLSelectStatement) visit(ctx.selectClauseN(1))));
             return result;
         }
         return visit(ctx.selectWithParens());
     }
     
-    private UnionType getUnionType(final SelectClauseNContext ctx) {
+    private CombiningType getCombiningType(final SelectClauseNContext ctx) {
         boolean isDistinct = null == ctx.allOrDistinct() || null != ctx.allOrDistinct().DISTINCT();
         if (null != ctx.UNION()) {
-            return isDistinct ? UnionType.UNION_DISTINCT : UnionType.UNION_ALL;
+            return isDistinct ? CombiningType.UNION_DISTINCT : CombiningType.UNION_ALL;
         }
         if (null != ctx.INTERSECT()) {
-            return isDistinct ? UnionType.INTERSECT_DISTINCT : UnionType.INTERSECT_ALL;
+            return isDistinct ? CombiningType.INTERSECT_DISTINCT : CombiningType.INTERSECT_ALL;
         }
-        return isDistinct ? UnionType.EXCEPT_DISTINCT : UnionType.EXCEPT_ALL;
+        return isDistinct ? CombiningType.EXCEPT_DISTINCT : CombiningType.EXCEPT_ALL;
     }
     
     @Override
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/UnionType.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/CombiningType.java
similarity index 93%
rename from shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/UnionType.java
rename to shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/CombiningType.java
index 287ea6c5981..858b577eeae 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/UnionType.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/constant/CombiningType.java
@@ -18,9 +18,10 @@
 package org.apache.shardingsphere.sql.parser.sql.common.constant;
 
 /**
- * Union type enum.
+ * Combining type.
  */
-public enum UnionType {
+public enum CombiningType {
+    
     UNION_ALL,
     UNION_DISTINCT,
     INTERSECT_ALL,
@@ -28,5 +29,5 @@ public enum UnionType {
     EXCEPT_ALL,
     EXCEPT_DISTINCT,
     MINUS_ALL,
-    MINUS_DISTINCT;
+    MINUS_DISTINCT
 }
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/union/UnionSegment.java b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/union/UnionSegment.java
index ae911625af8..172156beae5 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/union/UnionSegment.java
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/union/UnionSegment.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.sql.parser.sql.common.segment.dml.union;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.sql.parser.sql.common.constant.UnionType;
+import org.apache.shardingsphere.sql.parser.sql.common.constant.CombiningType;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.SQLSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
 
@@ -31,7 +31,7 @@ public class UnionSegment implements SQLSegment {
     
     private final int stopIndex;
     
-    private final UnionType unionType;
+    private final CombiningType combiningType;
     
     private final SelectStatement selectStatement;
 }
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java
index cb38e40f512..ae7e29aa30d 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dml/impl/SelectStatementAssert.java
@@ -190,7 +190,7 @@ public final class SelectStatementAssert {
         assertThat(assertContext.getText("Union size assertion error: "), unionSegments.size(), is(expected.getUnions().size()));
         int count = 0;
         for (UnionSegment each : unionSegments) {
-            assertThat(assertContext.getText("Union type assertion error: "), each.getUnionType().name(), is(expected.getUnions().get(count).getUnionType()));
+            assertThat(assertContext.getText("Union type assertion error: "), each.getCombiningType().name(), is(expected.getUnions().get(count).getCombiningType()));
             SQLSegmentAssert.assertIs(assertContext, each, expected.getUnions().get(count));
             assertIs(assertContext, each.getSelectStatement(), expected.getUnions().get(count).getSelectClause());
             count++;
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/union/ExpectedUnion.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/union/ExpectedUnion.java
index 048d52b26ea..a7c25d713e8 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/union/ExpectedUnion.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/union/ExpectedUnion.java
@@ -35,6 +35,6 @@ public final class ExpectedUnion extends AbstractExpectedSQLSegment {
     @XmlElement(name = "select")
     private SelectStatementTestCase selectClause;
     
-    @XmlAttribute(name = "union-type")
-    private String unionType;
+    @XmlAttribute(name = "combining-type")
+    private String combiningType;
 }
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select-union.xml b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select-union.xml
index e3a641f5e2e..960e2d8bb77 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select-union.xml
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/select-union.xml
@@ -24,7 +24,7 @@
         <from>
             <simple-table name="table1" start-index="14" stop-index="19" />
         </from>
-        <union union-type="UNION_DISTINCT" start-index="21" stop-index="46">
+        <union combining-type="UNION_DISTINCT" start-index="21" stop-index="46">
             <select>
                 <projections start-index="34" stop-index="34">
                     <shorthand-projection start-index="34" stop-index="34" />
@@ -43,7 +43,7 @@
         <from>
             <simple-table name="t_order" start-index="21" stop-index="27" />
         </from>
-        <union union-type="UNION_DISTINCT" start-index="29" stop-index="67">
+        <union combining-type="UNION_DISTINCT" start-index="29" stop-index="67">
             <select>
                 <projections start-index="42" stop-index="49">
                     <column-projection name="order_id" start-index="42" stop-index="49" />
@@ -62,7 +62,7 @@
         <from>
             <simple-table name="table1" start-index="14" stop-index="19" />
         </from>
-        <union union-type="INTERSECT_DISTINCT" start-index="21" stop-index="50">
+        <union combining-type="INTERSECT_DISTINCT" start-index="21" stop-index="50">
             <select>
                 <projections start-index="38" stop-index="38">
                     <shorthand-projection start-index="38" stop-index="38" />
@@ -72,7 +72,7 @@
                 </from>
             </select>
         </union>
-        <union union-type="INTERSECT_DISTINCT" start-index="52" stop-index="81">
+        <union combining-type="INTERSECT_DISTINCT" start-index="52" stop-index="81">
             <select>
                 <projections start-index="69" stop-index="69">
                     <shorthand-projection start-index="69" stop-index="69" />
@@ -91,7 +91,7 @@
         <from>
             <simple-table name="table1" start-index="14" stop-index="19" />
         </from>
-        <union union-type="EXCEPT_ALL" start-index="21" stop-index="51">
+        <union combining-type="EXCEPT_ALL" start-index="21" stop-index="51">
             <select>
                 <projections start-index="39" stop-index="39">
                     <shorthand-projection start-index="39" stop-index="39" />
@@ -101,7 +101,7 @@
                 </from>
             </select>
         </union>
-        <union union-type="EXCEPT_ALL" start-index="53" stop-index="83">
+        <union combining-type="EXCEPT_ALL" start-index="53" stop-index="83">
             <select>
                 <projections start-index="71" stop-index="71">
                     <shorthand-projection start-index="71" stop-index="71" />
@@ -120,7 +120,7 @@
         <from>
             <simple-table name="table1" start-index="14" stop-index="19" />
         </from>
-        <union union-type="MINUS_DISTINCT" start-index="21" stop-index="46">
+        <union combining-type="MINUS_DISTINCT" start-index="21" stop-index="46">
             <select>
                 <projections start-index="34" stop-index="34">
                     <shorthand-projection start-index="34" stop-index="34" />
@@ -139,7 +139,7 @@
         <from>
             <simple-table name="table1" start-index="14" stop-index="19" />
         </from>
-        <union union-type="UNION_DISTINCT" start-index="21" stop-index="75">
+        <union combining-type="UNION_DISTINCT" start-index="21" stop-index="75">
             <select>
                 <projections start-index="35" stop-index="35">
                     <shorthand-projection start-index="35" stop-index="35" />
@@ -147,7 +147,7 @@
                 <from>
                     <simple-table name="table2" start-index="42" stop-index="47" />
                 </from>
-                <union union-type="UNION_DISTINCT" start-index="49" stop-index="74">
+                <union combining-type="UNION_DISTINCT" start-index="49" stop-index="74">
                     <select>
                         <projections start-index="62" stop-index="62">
                             <shorthand-projection start-index="62" stop-index="62" />
diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/table.xml b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/table.xml
index d8cc8f3b828..3994534dd14 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/table.xml
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dml/table.xml
@@ -30,7 +30,7 @@
     
     <select sql-case-id="table_union">
         <simple-table name="T1" start-index="6" stop-index="7" />
-        <union union-type="UNION_DISTINCT" start-index="9" stop-index="22">
+        <union combining-type="UNION_DISTINCT" start-index="9" stop-index="22">
             <select>
                 <simple-table name="T2" start-index="21" stop-index="22" />
             </select>