shardingsphere-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From menghao...@apache.org
Subject [shardingsphere] branch master updated: Add AlterRDLStatement (#10772)
Date Fri, 11 Jun 2021 14:23:41 GMT
This is an automated email from the ASF dual-hosted git repository.

menghaoran 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 8622d19  Add AlterRDLStatement (#10772)
8622d19 is described below

commit 8622d19db2f02272158ae1fe51ccf9910cf9c52d
Author: Liang Zhang <terrymanu@163.com>
AuthorDate: Fri Jun 11 22:23:04 2021 +0800

    Add AlterRDLStatement (#10772)
    
    * Refactor AlterShardingBindingTableRulesStatement
    
    * Refactor AlterShardingBroadcastTableRulesStatement
    
    * Refactor AlterShardingTableRuleStatement
    
    * Refactor CreateShardingBindingTableRulesStatement
    
    * Refactor CreateShardingBroadcastTableRulesStatement
    
    * Refactor CreateShardingTableRuleStatement
    
    * Refactor DropDatabaseDiscoveryRuleStatement
    
    * Refactor DropReadwriteSplittingRuleStatement
    
    * Refactor DropResourceStatement
    
    * Refactor DropShardingTableRuleStatement
    
    * Add AlterRDLStatement
    
    * Add AlterRDLStatement
---
 .../distsql/parser/core/DistSQLVisitor.java        | 76 +++++++---------------
 .../api/DistSQLStatementParserEngineTest.java      | 24 +++----
 ...eRulesStatement.java => AlterRDLStatement.java} | 13 +---
 .../AlterDatabaseDiscoveryRuleStatement.java       |  6 +-
 .../{ => impl}/AlterEncryptRuleStatement.java      |  6 +-
 .../AlterReadwriteSplittingRuleStatement.java      |  6 +-
 .../AlterShardingBindingTableRulesStatement.java   | 10 +--
 .../AlterShardingBroadcastTableRulesStatement.java |  9 ++-
 .../AlterShardingTableRuleStatement.java           |  9 ++-
 .../CreateShardingBindingTableRulesStatement.java  |  3 +-
 ...CreateShardingBroadcastTableRulesStatement.java |  3 +-
 .../impl/CreateShardingTableRuleStatement.java     |  2 +-
 .../impl/DropDatabaseDiscoveryRuleStatement.java   |  5 +-
 .../impl/DropReadwriteSplittingRuleStatement.java  |  5 +-
 .../rdl/drop/impl/DropResourceStatement.java       |  5 +-
 .../drop/impl/DropShardingTableRuleStatement.java  |  5 +-
 .../impl/EncryptInsertOnUpdateTokenGenerator.java  |  2 +-
 .../merge/dal/EncryptDALResultDecoratorTest.java   |  4 +-
 .../ReadwriteSplittingRuleStatementConverter.java  |  2 +-
 .../converter/ShardingRuleStatementConverter.java  |  8 +--
 .../type/single/SingleTablesRoutingEngine.java     |  5 +-
 .../standard/ShardingStandardRoutingEngine.java    |  2 +-
 .../sharding/rule/ShardingRuleTest.java            | 22 +++----
 .../infra/rule/ShardingSphereRulesBuilderTest.java |  4 +-
 .../jdbc/recognizer/impl/MySQLRecognizer.java      |  2 +-
 .../text/distsql/rdl/RDLBackendHandlerFactory.java | 12 ++--
 .../AlterDatabaseDiscoveryRuleBackendHandler.java  |  2 +-
 .../rdl/impl/AlterEncryptRuleBackendHandler.java   |  2 +-
 .../AlterReadwriteSplittingRuleBackendHandler.java |  2 +-
 ...terShardingBindingTableRulesBackendHandler.java |  2 +-
 ...rShardingBroadcastTableRulesBackendHandler.java |  2 +-
 .../impl/AlterShardingTableRuleBackendHandler.java | 12 ++--
 .../CreateShardingTableRuleBackendHandler.java     | 10 +--
 .../rdl/impl/DropResourceBackendHandler.java       |  2 +-
 .../text/distsql/RDLBackendHandlerFactoryTest.java |  2 +-
 ...terDatabaseDiscoveryRuleBackendHandlerTest.java |  2 +-
 .../impl/AlterEncryptRuleBackendHandlerTest.java   |  4 +-
 ...erReadwriteSplittingRuleBackendHandlerTest.java |  8 +--
 ...hardingBindingTableRulesBackendHandlerTest.java | 35 +++++-----
 ...rdingBroadcastTableRulesBackendHandlerTest.java | 14 ++--
 .../AlterShardingTableRuleBackendHandlerTest.java  | 22 +++----
 ...ateDatabaseDiscoveryRuleBackendHandlerTest.java |  2 +-
 .../impl/CreateEncryptRuleBackendHandlerTest.java  |  2 +-
 ...teReadwriteSplittingRuleBackendHandlerTest.java |  8 +--
 ...hardingBindingTableRulesBackendHandlerTest.java | 21 +++---
 ...rdingBroadcastTableRulesBackendHandlerTest.java | 17 ++---
 .../CreateShardingTableRuleBackendHandlerTest.java | 14 ++--
 .../rdl/impl/DropDatabaseBackendHandlerTest.java   |  4 +-
 ...ropDatabaseDiscoveryRuleBackendHandlerTest.java | 13 ++--
 .../impl/DropEncryptRuleBackendHandlerTest.java    | 24 +++----
 ...opReadwriteSplittingRuleBackendHandlerTest.java | 16 ++---
 ...hardingBindingTableRulesBackendHandlerTest.java | 23 ++++---
 ...rdingBroadcastTableRulesBackendHandlerTest.java | 20 +++---
 .../DropShardingTableRuleBackendHandlerTest.java   | 38 +++++------
 .../binary/reset/MySQLComStmtResetExecutor.java    |  2 +-
 .../binary/close/PostgreSQLComCloseExecutor.java   |  6 +-
 .../binary/sync/PostgreSQLComSyncExecutor.java     |  2 +-
 .../query/text/PostgreSQLComQueryExecutor.java     |  6 +-
 .../dialect/MariaDBXADataSourceDefinitionTest.java |  2 +-
 59 files changed, 265 insertions(+), 326 deletions(-)

diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/DistSQLVisitor.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/DistSQLVisitor.java
index 81b65cc..6ffbc42 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/DistSQLVisitor.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/DistSQLVisitor.java
@@ -84,12 +84,12 @@ import org.apache.shardingsphere.distsql.parser.statement.ral.impl.ShowScalingJo
 import org.apache.shardingsphere.distsql.parser.statement.ral.impl.ShowScalingJobStatusStatement;
 import org.apache.shardingsphere.distsql.parser.statement.ral.impl.StartScalingJobStatement;
 import org.apache.shardingsphere.distsql.parser.statement.ral.impl.StopScalingJobStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterDatabaseDiscoveryRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterEncryptRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBindingTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBroadcastTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingTableRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterDatabaseDiscoveryRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterEncryptRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBindingTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBroadcastTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingTableRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.AddResourceStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateDatabaseDiscoveryRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateEncryptRuleStatement;
@@ -155,38 +155,28 @@ public final class DistSQLVisitor extends DistSQLStatementBaseVisitor<ASTNode> {
     
     @Override
     public ASTNode visitCreateShardingBindingTableRules(final CreateShardingBindingTableRulesContext ctx) {
-        CreateShardingBindingTableRulesStatement result = new CreateShardingBindingTableRulesStatement();
+        Collection<ShardingBindingTableRuleSegment> rules = new LinkedList<>();
         for (BindTableRulesDefinitionContext each : ctx.bindTableRulesDefinition()) {
             ShardingBindingTableRuleSegment segment = new ShardingBindingTableRuleSegment();
             segment.setTables(Joiner.on(",").join(each.tableName().stream().map(t -> new IdentifierValue(t.getText()).getValue()).collect(Collectors.toList())));
-            result.getRules().add(segment);
+            rules.add(segment);
         }
-        return result;
+        return new CreateShardingBindingTableRulesStatement(rules);
     }
     
     @Override
     public ASTNode visitDropResource(final DropResourceContext ctx) {
-        DropResourceStatement result = new DropResourceStatement();
-        for (TerminalNode each : ctx.IDENTIFIER()) {
-            result.getResourceNames().add(each.getText());
-        }
-        return result;
+        return new DropResourceStatement(ctx.IDENTIFIER().stream().map(ParseTree::getText).collect(Collectors.toList()));
     }
     
     @Override
     public ASTNode visitCreateShardingBroadcastTableRules(final CreateShardingBroadcastTableRulesContext ctx) {
-        CreateShardingBroadcastTableRulesStatement result = new CreateShardingBroadcastTableRulesStatement();
-        result.getTables().addAll(ctx.IDENTIFIER().stream().map(ParseTree::getText).collect(Collectors.toList()));
-        return result;
+        return new CreateShardingBroadcastTableRulesStatement(ctx.IDENTIFIER().stream().map(ParseTree::getText).collect(Collectors.toList()));
     }
     
     @Override
     public ASTNode visitAlterShardingTableRule(final AlterShardingTableRuleContext ctx) {
-        AlterShardingTableRuleStatement result = new AlterShardingTableRuleStatement();
-        for (ShardingTableRuleDefinitionContext each : ctx.shardingTableRuleDefinition()) {
-            result.getTables().add((TableRuleSegment) visit(each));
-        }
-        return result;
+        return new AlterShardingTableRuleStatement(ctx.shardingTableRuleDefinition().stream().map(each -> (TableRuleSegment) visit(each)).collect(Collectors.toList()));
     }
     
     @Override
@@ -196,34 +186,29 @@ public final class DistSQLVisitor extends DistSQLStatementBaseVisitor<ASTNode> {
     
     @Override
     public ASTNode visitAlterShardingBindingTableRules(final AlterShardingBindingTableRulesContext ctx) {
-        AlterShardingBindingTableRulesStatement result = new AlterShardingBindingTableRulesStatement();
+        Collection<ShardingBindingTableRuleSegment> rules = new LinkedList<>();
         for (BindTableRulesDefinitionContext each : ctx.bindTableRulesDefinition()) {
             ShardingBindingTableRuleSegment segment = new ShardingBindingTableRuleSegment();
-            segment.setTables(Joiner.on(",")
-                    .join(each.tableName().stream().map(t -> new IdentifierValue(t.getText()).getValue()).collect(Collectors.toList())));
-            result.getRules().add(segment);
+            segment.setTables(Joiner.on(",").join(each.tableName().stream().map(t -> new IdentifierValue(t.getText()).getValue()).collect(Collectors.toList())));
+            rules.add(segment);
         }
-        return result;
+        return new AlterShardingBindingTableRulesStatement(rules);
     }
     
     @Override
     public ASTNode visitAlterShardingBroadcastTableRules(final AlterShardingBroadcastTableRulesContext ctx) {
-        AlterShardingBroadcastTableRulesStatement result = new AlterShardingBroadcastTableRulesStatement();
-        result.getTables().addAll(ctx.IDENTIFIER().stream().map(ParseTree::getText).collect(Collectors.toList()));
-        return result;
+        return new AlterShardingBroadcastTableRulesStatement(ctx.IDENTIFIER().stream().map(ParseTree::getText).collect(Collectors.toList()));
     }
     
     @Override
     public ASTNode visitCreateReadwriteSplittingRule(final CreateReadwriteSplittingRuleContext ctx) {
-        return new CreateReadwriteSplittingRuleStatement(ctx.readwriteSplittingRuleDefinition()
-                .stream().map(each -> (ReadwriteSplittingRuleSegment) visit(each)).collect(Collectors.toList()));
+        return new CreateReadwriteSplittingRuleStatement(ctx.readwriteSplittingRuleDefinition().stream().map(each -> (ReadwriteSplittingRuleSegment) visit(each)).collect(Collectors.toList()));
     }
     
     @Override
     public ASTNode visitReadwriteSplittingRuleDefinition(final ReadwriteSplittingRuleDefinitionContext ctx) {
         ReadwriteSplittingRuleSegment result = (ReadwriteSplittingRuleSegment) (null != ctx.dynamicReadwriteSplittingRuleDefinition()
-                        ? visit(ctx.dynamicReadwriteSplittingRuleDefinition())
-                        : visit(ctx.staticReadwriteSplittingRuleDefinition()));
+                        ? visit(ctx.dynamicReadwriteSplittingRuleDefinition()) : visit(ctx.staticReadwriteSplittingRuleDefinition()));
         Properties props = new Properties();
         if (null != ctx.functionDefinition().algorithmProperties()) {
             ctx.functionDefinition().algorithmProperties().algorithmProperty()
@@ -258,11 +243,7 @@ public final class DistSQLVisitor extends DistSQLStatementBaseVisitor<ASTNode> {
     
     @Override
     public ASTNode visitDropShardingTableRule(final DropShardingTableRuleContext ctx) {
-        DropShardingTableRuleStatement result = new DropShardingTableRuleStatement();
-        for (TableNameContext each : ctx.tableName()) {
-            result.getTableNames().add((TableNameSegment) visit(each));
-        }
-        return result;
+        return new DropShardingTableRuleStatement(ctx.tableName().stream().map(each -> (TableNameSegment) visit(each)).collect(Collectors.toList()));
     }
     
     @Override
@@ -333,21 +314,17 @@ public final class DistSQLVisitor extends DistSQLStatementBaseVisitor<ASTNode> {
     
     @Override
     public ASTNode visitDropDatabaseDiscoveryRule(final DropDatabaseDiscoveryRuleContext ctx) {
-        DropDatabaseDiscoveryRuleStatement result = new DropDatabaseDiscoveryRuleStatement();
-        result.getRuleNames().addAll(ctx.IDENTIFIER().stream().map(TerminalNode::getText).collect(Collectors.toList()));
-        return result;
+        return new DropDatabaseDiscoveryRuleStatement(ctx.IDENTIFIER().stream().map(TerminalNode::getText).collect(Collectors.toList()));
     }
     
     @Override
     public ASTNode visitCreateEncryptRule(final CreateEncryptRuleContext ctx) {
-        return new CreateEncryptRuleStatement(ctx.encryptRuleDefinition()
-                .stream().map(each -> (EncryptRuleSegment) visit(each)).collect(Collectors.toList()));
+        return new CreateEncryptRuleStatement(ctx.encryptRuleDefinition().stream().map(each -> (EncryptRuleSegment) visit(each)).collect(Collectors.toList()));
     }
     
     @Override
     public ASTNode visitEncryptRuleDefinition(final EncryptRuleDefinitionContext ctx) {
-        return new EncryptRuleSegment(ctx.tableName().getText(), ctx.columnDefinition()
-                .stream().map(each -> (EncryptColumnSegment) visit(each)).collect(Collectors.toList()));
+        return new EncryptRuleSegment(ctx.tableName().getText(), ctx.columnDefinition().stream().map(each -> (EncryptColumnSegment) visit(each)).collect(Collectors.toList()));
     }
     
     @Override
@@ -364,8 +341,7 @@ public final class DistSQLVisitor extends DistSQLStatementBaseVisitor<ASTNode> {
     
     @Override
     public ASTNode visitAlterEncryptRule(final AlterEncryptRuleContext ctx) {
-        return new AlterEncryptRuleStatement(ctx.encryptRuleDefinition()
-                .stream().map(each -> (EncryptRuleSegment) visit(each)).collect(Collectors.toList()));
+        return new AlterEncryptRuleStatement(ctx.encryptRuleDefinition().stream().map(each -> (EncryptRuleSegment) visit(each)).collect(Collectors.toList()));
     }
     
     @Override
@@ -380,9 +356,7 @@ public final class DistSQLVisitor extends DistSQLStatementBaseVisitor<ASTNode> {
     
     @Override
     public ASTNode visitDropReadwriteSplittingRule(final DropReadwriteSplittingRuleContext ctx) {
-        DropReadwriteSplittingRuleStatement result = new DropReadwriteSplittingRuleStatement();
-        result.getRuleNames().addAll(ctx.IDENTIFIER().stream().map(TerminalNode::getText).collect(Collectors.toList()));
-        return result;
+        return new DropReadwriteSplittingRuleStatement(ctx.IDENTIFIER().stream().map(TerminalNode::getText).collect(Collectors.toList()));
     }
     
     @Override
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/test/java/org/apache/shardingsphere/distsql/parser/api/DistSQLStatementParserEngineTest.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/test/java/org/apache/shardingsphere/distsql/parser/api/DistSQLStatementParserEngineTest.java
index 50a8d8e..dbc58b6 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/test/java/org/apache/shardingsphere/distsql/parser/api/DistSQLStatementParserEngineTest.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/test/java/org/apache/shardingsphere/distsql/parser/api/DistSQLStatementParserEngineTest.java
@@ -24,12 +24,12 @@ import org.apache.shardingsphere.distsql.parser.segment.rdl.ReadwriteSplittingRu
 import org.apache.shardingsphere.distsql.parser.segment.rdl.EncryptColumnSegment;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.EncryptRuleSegment;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ShardingBindingTableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterDatabaseDiscoveryRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterEncryptRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBindingTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBroadcastTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingTableRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterDatabaseDiscoveryRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterEncryptRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBindingTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBroadcastTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingTableRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.AddResourceStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateDatabaseDiscoveryRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateEncryptRuleStatement;
@@ -232,16 +232,16 @@ public final class DistSQLStatementParserEngineTest {
     public void assertParseDropResource() {
         SQLStatement sqlStatement = engine.parse(RDL_DROP_RESOURCE);
         assertTrue(sqlStatement instanceof DropResourceStatement);
-        assertThat(((DropResourceStatement) sqlStatement).getResourceNames().size(), is(2));
-        assertTrue(((DropResourceStatement) sqlStatement).getResourceNames().containsAll(Arrays.asList("ds_0", "ds_1")));
+        assertThat(((DropResourceStatement) sqlStatement).getNames().size(), is(2));
+        assertTrue(((DropResourceStatement) sqlStatement).getNames().containsAll(Arrays.asList("ds_0", "ds_1")));
     }
     
     @Test
     public void assertParseCreateShardingTableRule() {
         SQLStatement sqlStatement = engine.parse(RDL_CREATE_SHARDING_TABLE_RULE);
         assertTrue(sqlStatement instanceof CreateShardingTableRuleStatement);
-        assertThat(((CreateShardingTableRuleStatement) sqlStatement).getTables().size(), is(1));
-        TableRuleSegment tableRuleSegment = ((CreateShardingTableRuleStatement) sqlStatement).getTables().iterator().next();
+        assertThat(((CreateShardingTableRuleStatement) sqlStatement).getRules().size(), is(1));
+        TableRuleSegment tableRuleSegment = ((CreateShardingTableRuleStatement) sqlStatement).getRules().iterator().next();
         assertThat(tableRuleSegment.getLogicTable(), is("t_order"));
         assertTrue(tableRuleSegment.getDataSources().containsAll(Arrays.asList("ms_group_0", "ms_group_1")));
         assertThat(tableRuleSegment.getTableStrategyColumn(), is("order_id"));
@@ -275,8 +275,8 @@ public final class DistSQLStatementParserEngineTest {
     public void assertParseAlterShardingTableRule() {
         SQLStatement sqlStatement = engine.parse(RDL_ALTER_SHARDING_TABLE_RULE);
         assertTrue(sqlStatement instanceof AlterShardingTableRuleStatement);
-        assertThat(((AlterShardingTableRuleStatement) sqlStatement).getTables().size(), is(1));
-        TableRuleSegment tableRuleSegment = ((AlterShardingTableRuleStatement) sqlStatement).getTables().iterator().next();
+        assertThat(((AlterShardingTableRuleStatement) sqlStatement).getRules().size(), is(1));
+        TableRuleSegment tableRuleSegment = ((AlterShardingTableRuleStatement) sqlStatement).getRules().iterator().next();
         assertThat(tableRuleSegment.getLogicTable(), is("t_order"));
         assertTrue(tableRuleSegment.getDataSources().containsAll(Arrays.asList("ms_group_0", "ms_group_1")));
         assertThat(tableRuleSegment.getTableStrategyColumn(), is("order_id"));
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBroadcastTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterRDLStatement.java
similarity index 72%
copy from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBroadcastTableRulesStatement.java
copy to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterRDLStatement.java
index 8ccb85d..711a563 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBroadcastTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterRDLStatement.java
@@ -17,19 +17,10 @@
 
 package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
 
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
 
-import java.util.Collection;
-import java.util.LinkedList;
-
 /**
- * Alter sharding broadcast table rules statement.
+ * Alter RDL statement.
  */
-@RequiredArgsConstructor
-@Getter
-public final class AlterShardingBroadcastTableRulesStatement extends RDLStatement {
-    
-    private final Collection<String> tables = new LinkedList<>();
+public abstract class AlterRDLStatement extends RDLStatement {
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterDatabaseDiscoveryRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterDatabaseDiscoveryRuleStatement.java
similarity index 86%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterDatabaseDiscoveryRuleStatement.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterDatabaseDiscoveryRuleStatement.java
index bdabc15..5af9d62 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterDatabaseDiscoveryRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterDatabaseDiscoveryRuleStatement.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
+package org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRDLStatement;
 
 import java.util.Collection;
 
@@ -29,7 +29,7 @@ import java.util.Collection;
  */
 @RequiredArgsConstructor
 @Getter
-public final class AlterDatabaseDiscoveryRuleStatement extends RDLStatement {
+public final class AlterDatabaseDiscoveryRuleStatement extends AlterRDLStatement {
     
     private final Collection<DatabaseDiscoveryRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterEncryptRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterEncryptRuleStatement.java
similarity index 87%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterEncryptRuleStatement.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterEncryptRuleStatement.java
index 7baa8fd..6dedb87 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterEncryptRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterEncryptRuleStatement.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
+package org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.EncryptRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRDLStatement;
 
 import java.util.Collection;
 
@@ -29,7 +29,7 @@ import java.util.Collection;
  */
 @RequiredArgsConstructor
 @Getter
-public final class AlterEncryptRuleStatement extends RDLStatement {
+public final class AlterEncryptRuleStatement extends AlterRDLStatement {
     
     private final Collection<EncryptRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterReadwriteSplittingRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterReadwriteSplittingRuleStatement.java
similarity index 91%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterReadwriteSplittingRuleStatement.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterReadwriteSplittingRuleStatement.java
index c6bf798..c82bf49 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterReadwriteSplittingRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterReadwriteSplittingRuleStatement.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
+package org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ReadwriteSplittingRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRDLStatement;
 
 import java.util.Collection;
 
@@ -29,7 +29,7 @@ import java.util.Collection;
  */
 @RequiredArgsConstructor
 @Getter
-public final class AlterReadwriteSplittingRuleStatement extends RDLStatement {
+public final class AlterReadwriteSplittingRuleStatement extends AlterRDLStatement {
     
     private final Collection<ReadwriteSplittingRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBindingTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingBindingTableRulesStatement.java
similarity index 89%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBindingTableRulesStatement.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingBindingTableRulesStatement.java
index 5a1ace3..f489a63 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBindingTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingBindingTableRulesStatement.java
@@ -15,21 +15,21 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
+package org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ShardingBindingTableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRDLStatement;
+
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Alter sharding binding table rules statement.
  */
 @RequiredArgsConstructor
 @Getter
-public final class AlterShardingBindingTableRulesStatement extends RDLStatement {
+public final class AlterShardingBindingTableRulesStatement extends AlterRDLStatement {
     
-    private final Collection<ShardingBindingTableRuleSegment> rules = new LinkedList<>();
+    private final Collection<ShardingBindingTableRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBroadcastTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingBroadcastTableRulesStatement.java
similarity index 85%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBroadcastTableRulesStatement.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingBroadcastTableRulesStatement.java
index 8ccb85d..d06a855 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingBroadcastTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingBroadcastTableRulesStatement.java
@@ -15,21 +15,20 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
+package org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Alter sharding broadcast table rules statement.
  */
 @RequiredArgsConstructor
 @Getter
-public final class AlterShardingBroadcastTableRulesStatement extends RDLStatement {
+public final class AlterShardingBroadcastTableRulesStatement extends AlterRDLStatement {
     
-    private final Collection<String> tables = new LinkedList<>();
+    private final Collection<String> tables;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingTableRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingTableRuleStatement.java
similarity index 81%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingTableRuleStatement.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingTableRuleStatement.java
index d8ca2f7..44ffc99 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/AlterShardingTableRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/alter/impl/AlterShardingTableRuleStatement.java
@@ -15,22 +15,21 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.distsql.parser.statement.rdl.alter;
+package org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.TableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.RDLStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Alter sharding table rule statement.
  */
 @RequiredArgsConstructor
 @Getter
-public final class AlterShardingTableRuleStatement extends RDLStatement {
+public final class AlterShardingTableRuleStatement extends AlterRDLStatement {
     
-    private final Collection<TableRuleSegment> tables = new LinkedList<>();
+    private final Collection<TableRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBindingTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBindingTableRulesStatement.java
index 5a24b4b..5305acb 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBindingTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBindingTableRulesStatement.java
@@ -23,7 +23,6 @@ import org.apache.shardingsphere.distsql.parser.segment.rdl.ShardingBindingTable
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.CreateRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Create sharding binding table rules statement.
@@ -32,5 +31,5 @@ import java.util.LinkedList;
 @Getter
 public final class CreateShardingBindingTableRulesStatement extends CreateRDLStatement {
     
-    private final Collection<ShardingBindingTableRuleSegment> rules = new LinkedList<>();
+    private final Collection<ShardingBindingTableRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBroadcastTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBroadcastTableRulesStatement.java
index 71a31c0..8b8ba96 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBroadcastTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingBroadcastTableRulesStatement.java
@@ -22,7 +22,6 @@ import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.CreateRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Create sharding broadcast table rules statement.
@@ -31,5 +30,5 @@ import java.util.LinkedList;
 @Getter
 public final class CreateShardingBroadcastTableRulesStatement extends CreateRDLStatement {
     
-    private final Collection<String> tables = new LinkedList<>();
+    private final Collection<String> tables;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingTableRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingTableRuleStatement.java
index ff65aec..4e41d29 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingTableRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateShardingTableRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class CreateShardingTableRuleStatement extends CreateRDLStatement {
     
-    private final Collection<TableRuleSegment> tables;
+    private final Collection<TableRuleSegment> rules;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropDatabaseDiscoveryRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropDatabaseDiscoveryRuleStatement.java
index 76b7681..f41fe36 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropDatabaseDiscoveryRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropDatabaseDiscoveryRuleStatement.java
@@ -18,16 +18,17 @@
 package org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl;
 
 import lombok.Getter;
+import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Drop database discovery rule statement.
  */
+@RequiredArgsConstructor
 @Getter
 public final class DropDatabaseDiscoveryRuleStatement extends DropRDLStatement {
     
-    private final Collection<String> ruleNames = new LinkedList<>();
+    private final Collection<String> ruleNames;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropReadwriteSplittingRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropReadwriteSplittingRuleStatement.java
index 6854814..9c06276 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropReadwriteSplittingRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropReadwriteSplittingRuleStatement.java
@@ -18,16 +18,17 @@
 package org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl;
 
 import lombok.Getter;
+import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Drop readwrite splitting rule statement.
  */
+@RequiredArgsConstructor
 @Getter
 public final class DropReadwriteSplittingRuleStatement extends DropRDLStatement {
     
-    private final Collection<String> ruleNames = new LinkedList<>();
+    private final Collection<String> ruleNames;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropResourceStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropResourceStatement.java
index 9f79cf3..8674184 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropResourceStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropResourceStatement.java
@@ -18,16 +18,17 @@
 package org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl;
 
 import lombok.Getter;
+import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRDLStatement;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Drop resource statement.
  */
+@RequiredArgsConstructor
 @Getter
 public final class DropResourceStatement extends DropRDLStatement {
     
-    private final Collection<String> resourceNames = new LinkedList<>();
+    private final Collection<String> names;
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingTableRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingTableRuleStatement.java
index b41f89d..59ef8ea 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingTableRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingTableRuleStatement.java
@@ -18,17 +18,18 @@
 package org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl;
 
 import lombok.Getter;
+import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRDLStatement;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Drop sharding table rule statement.
  */
+@RequiredArgsConstructor
 @Getter
 public final class DropShardingTableRuleStatement extends DropRDLStatement {
     
-    private final Collection<TableNameSegment> tableNames = new LinkedList<>();
+    private final Collection<TableNameSegment> tableNames;
 }
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptInsertOnUpdateTokenGenerator.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptInsertOnUpdateTokenGenerator.java
index ce9f614..a140ca2 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptInsertOnUpdateTokenGenerator.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptInsertOnUpdateTokenGenerator.java
@@ -97,7 +97,7 @@ public final class EncryptInsertOnUpdateTokenGenerator extends BaseEncryptSQLTok
     private void addCipherColumn(final String tableName, final String columnName, final EncryptParameterAssignmentToken token) {
         token.addColumnName(getEncryptRule().getCipherColumn(tableName, columnName));
     }
-
+    
     private void addAssistedQueryColumn(final String tableName, final String columnName, final EncryptParameterAssignmentToken token) {
         getEncryptRule().findAssistedQueryColumn(tableName, columnName).ifPresent(token::addColumnName);
     }
diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/EncryptDALResultDecoratorTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/EncryptDALResultDecoratorTest.java
index 210638b..9935c5a 100644
--- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/EncryptDALResultDecoratorTest.java
+++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/EncryptDALResultDecoratorTest.java
@@ -79,7 +79,7 @@ public final class EncryptDALResultDecoratorTest {
     private SQLStatementContext<?> getDescribeStatementContext() {
         ExplainStatementContext result = mock(ExplainStatementContext.class);
         SimpleTableSegment simpleTableSegment = getSimpleTableSegment();
-        when(result.getAllTables()).thenReturn(Collections.singletonList(simpleTableSegment));
+        when(result.getAllTables()).thenReturn(Collections.singleton(simpleTableSegment));
         when(result.getSqlStatement()).thenReturn(mock(MySQLExplainStatement.class));
         return result;
     }
@@ -87,7 +87,7 @@ public final class EncryptDALResultDecoratorTest {
     private SQLStatementContext<?> getShowColumnsStatementContext() {
         ShowColumnsStatementContext result = mock(ShowColumnsStatementContext.class);
         SimpleTableSegment simpleTableSegment = getSimpleTableSegment();
-        when(result.getAllTables()).thenReturn(Collections.singletonList(simpleTableSegment));
+        when(result.getAllTables()).thenReturn(Collections.singleton(simpleTableSegment));
         when(result.getSqlStatement()).thenReturn(mock(MySQLShowColumnsStatement.class));
         return result;
     }
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/converter/ReadwriteSplittingRuleStatementConverter.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/converter/ReadwriteSplittingRuleStatementConverter.java
index 296ecce..ed36a82 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/converter/ReadwriteSplittingRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/converter/ReadwriteSplittingRuleStatementConverter.java
@@ -21,7 +21,7 @@ import com.google.common.base.Strings;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ReadwriteSplittingRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.infra.yaml.config.algorithm.YamlShardingSphereAlgorithmConfiguration;
 import org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSplittingRuleConfiguration;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/converter/ShardingRuleStatementConverter.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/converter/ShardingRuleStatementConverter.java
index 44743ad..b7223cc 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/converter/ShardingRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/converter/ShardingRuleStatementConverter.java
@@ -24,8 +24,8 @@ import lombok.NoArgsConstructor;
 import org.apache.shardingsphere.distsql.parser.segment.FunctionSegment;
 import org.apache.shardingsphere.distsql.parser.segment.TableRuleSegment;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ShardingBindingTableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBindingTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingTableRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBindingTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingTableRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateShardingBindingTableRulesStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateShardingTableRuleStatement;
 import org.apache.shardingsphere.infra.yaml.config.algorithm.YamlShardingSphereAlgorithmConfiguration;
@@ -51,7 +51,7 @@ public final class ShardingRuleStatementConverter {
      * @return YAML sharding rule configuration
      */
     public static YamlShardingRuleConfiguration convert(final CreateShardingTableRuleStatement sqlStatement) {
-        return convertTableRuleSegments(sqlStatement.getTables());
+        return convertTableRuleSegments(sqlStatement.getRules());
     }
 
     /**
@@ -61,7 +61,7 @@ public final class ShardingRuleStatementConverter {
      * @return YAML sharding rule configuration
      */
     public static YamlShardingRuleConfiguration convert(final AlterShardingTableRuleStatement sqlStatement) {
-        return convertTableRuleSegments(sqlStatement.getTables());
+        return convertTableRuleSegments(sqlStatement.getRules());
     }
     
     /**
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/SingleTablesRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/SingleTablesRoutingEngine.java
index 4ce1b63..c0eb5d4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/SingleTablesRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/SingleTablesRoutingEngine.java
@@ -71,7 +71,7 @@ public final class SingleTablesRoutingEngine implements ShardingRouteEngine {
         Collection<String> dataSourceNames = shardingRule.getDataSourceNames();
         String dataSource = Lists.newArrayList(dataSourceNames).get(ThreadLocalRandom.current().nextInt(dataSourceNames.size()));
         String table = logicTables.iterator().next();
-        return new RouteUnit(new RouteMapper(dataSource, dataSource), Collections.singletonList(new RouteMapper(table, table)));
+        return new RouteUnit(new RouteMapper(dataSource, dataSource), Collections.singleton(new RouteMapper(table, table)));
     }
     
     private void fillRouteContext(final ShardingRule shardingRule, final RouteContext routeContext, final Collection<String> logicTables) {
@@ -80,8 +80,7 @@ public final class SingleTablesRoutingEngine implements ShardingRouteEngine {
                 throw new ShardingSphereException("`%s` single table does not exist.", each);
             }
             String dataSource = shardingRule.getSingleTableRules().get(each).getDataSourceName();
-            RouteMapper dataSourceMapper = new RouteMapper(dataSource, dataSource);
-            routeContext.putRouteUnit(dataSourceMapper, new RouteMapper(each, each));
+            routeContext.putRouteUnit(new RouteMapper(dataSource, dataSource), new RouteMapper(each, each));
         }
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
index 72ff2b5..bfda82a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
@@ -70,7 +70,7 @@ public final class ShardingStandardRoutingEngine implements ShardingRouteEngine
         routeContext.getOriginalDataNodes().addAll(originalDataNodes);
         for (DataNode each : dataNodes) {
             routeContext.getRouteUnits().add(
-                    new RouteUnit(new RouteMapper(each.getDataSourceName(), each.getDataSourceName()), Collections.singletonList(new RouteMapper(logicTableName, each.getTableName()))));
+                    new RouteUnit(new RouteMapper(each.getDataSourceName(), each.getDataSourceName()), Collections.singleton(new RouteMapper(logicTableName, each.getTableName()))));
         }
     }
     
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
index 4a704c6..f7161cc 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
@@ -62,7 +62,7 @@ public final class ShardingRuleTest {
         assertThat(actual.getTableRules().size(), is(2));
         assertThat(actual.getBindingTableRules().size(), is(1));
         assertThat(actual.getBindingTableRules().iterator().next().getTableRules().size(), is(2));
-        assertThat(actual.getBroadcastTables(), is(Collections.singletonList("BROADCAST_TABLE")));
+        assertThat(actual.getBroadcastTables(), is(Collections.singleton("BROADCAST_TABLE")));
         assertThat(actual.getDefaultKeyGenerateAlgorithm(), instanceOf(IncrementKeyGenerateAlgorithm.class));
     }
     
@@ -129,21 +129,21 @@ public final class ShardingRuleTest {
     
     @Test
     public void assertIsNotAllBindingTable() {
-        assertFalse(createMaximumShardingRule().isAllBindingTables(Collections.singletonList("new_Table")));
+        assertFalse(createMaximumShardingRule().isAllBindingTables(Collections.singleton("new_Table")));
         assertFalse(createMaximumShardingRule().isAllBindingTables(Arrays.asList("logic_Table", "new_Table")));
     }
     
     @Test
     public void assertIsAllBindingTable() {
-        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singletonList("logic_Table")));
-        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singletonList("logic_table")));
-        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singletonList("sub_Logic_Table")));
-        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singletonList("sub_logic_table")));
+        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singleton("logic_Table")));
+        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singleton("logic_table")));
+        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singleton("sub_Logic_Table")));
+        assertTrue(createMaximumShardingRule().isAllBindingTables(Collections.singleton("sub_logic_table")));
         assertTrue(createMaximumShardingRule().isAllBindingTables(Arrays.asList("logic_Table", "sub_Logic_Table")));
         assertTrue(createMaximumShardingRule().isAllBindingTables(Arrays.asList("logic_table", "sub_logic_Table")));
         assertFalse(createMaximumShardingRule().isAllBindingTables(Arrays.asList("logic_table", "sub_logic_Table", "new_table")));
         assertFalse(createMaximumShardingRule().isAllBindingTables(Collections.emptyList()));
-        assertFalse(createMaximumShardingRule().isAllBindingTables(Collections.singletonList("new_Table")));
+        assertFalse(createMaximumShardingRule().isAllBindingTables(Collections.singleton("new_Table")));
     }
     
     @Test
@@ -170,7 +170,7 @@ public final class ShardingRuleTest {
     
     @Test
     public void assertIsAllBroadcastTable() {
-        assertTrue(createMaximumShardingRule().isAllBroadcastTables(Collections.singletonList("Broadcast_Table")));
+        assertTrue(createMaximumShardingRule().isAllBroadcastTables(Collections.singleton("Broadcast_Table")));
     }
     
     @Test
@@ -272,7 +272,7 @@ public final class ShardingRuleTest {
     @Test
     public void assertGetShardingLogicTableNames() {
         ShardingRule actual = createMaximumShardingRule();
-        assertThat(actual.getShardingLogicTableNames(Arrays.asList("LOGIC_TABLE", "BROADCAST_TABLE")), is(Collections.singletonList("LOGIC_TABLE")));
+        assertThat(actual.getShardingLogicTableNames(Arrays.asList("LOGIC_TABLE", "BROADCAST_TABLE")), is(Collections.singleton("LOGIC_TABLE")));
     }
     
     @Test(expected = IllegalArgumentException.class)
@@ -285,7 +285,7 @@ public final class ShardingRuleTest {
     
     @Test
     public void assertTableRuleExists() {
-        assertTrue(createMaximumShardingRule().tableRuleExists(Collections.singletonList("logic_table")));
+        assertTrue(createMaximumShardingRule().tableRuleExists(Collections.singleton("logic_table")));
     }
     
     @Test
@@ -295,7 +295,7 @@ public final class ShardingRuleTest {
     
     @Test
     public void assertTableRuleNotExists() {
-        assertFalse(createMinimumShardingRule().tableRuleExists(Collections.singletonList("table_0")));
+        assertFalse(createMinimumShardingRule().tableRuleExists(Collections.singleton("table_0")));
     }
     
     @Test
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/rule/ShardingSphereRulesBuilderTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/rule/ShardingSphereRulesBuilderTest.java
index f03f21c..6b966a0 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/rule/ShardingSphereRulesBuilderTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/rule/ShardingSphereRulesBuilderTest.java
@@ -37,7 +37,7 @@ public final class ShardingSphereRulesBuilderTest {
     public void assertBuild() {
         RuleConfiguration ruleConfig = new TestRuleConfiguration();
         Collection<ShardingSphereRule> shardingSphereRules = ShardingSphereRulesBuilder.buildSchemaRules(
-                "schema_name", Collections.singletonList(ruleConfig), mock(DatabaseType.class), Collections.emptyMap());
-        assertThat(shardingSphereRules, is(Collections.singletonList(TestShardingSphereRuleBuilder.getRULE())));
+                "schema_name", Collections.singleton(ruleConfig), mock(DatabaseType.class), Collections.emptyMap());
+        assertThat(shardingSphereRules, is(Collections.singleton(TestShardingSphereRuleBuilder.getRULE())));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/recognizer/impl/MySQLRecognizer.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/recognizer/impl/MySQLRecognizer.java
index 0990b3e..53a476e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/recognizer/impl/MySQLRecognizer.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/recognizer/impl/MySQLRecognizer.java
@@ -34,7 +34,7 @@ public final class MySQLRecognizer implements JDBCDriverURLRecognizer {
     
     @Override
     public Collection<String> getURLPrefixes() {
-        return Collections.singletonList("jdbc:mysql:");
+        return Collections.singleton("jdbc:mysql:");
     }
     
     @Override
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
index 2f483cf..c7bc54e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
@@ -19,12 +19,12 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterDatabaseDiscoveryRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterEncryptRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBindingTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBroadcastTableRulesStatement;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingTableRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterDatabaseDiscoveryRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterEncryptRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBindingTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBroadcastTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingTableRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.AddResourceStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateDatabaseDiscoveryRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateEncryptRuleStatement;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java
index 8519ddf..e19ace9 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandler.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDa
 import org.apache.shardingsphere.dbdiscovery.yaml.converter.DatabaseDiscoveryRuleStatementConverter;
 import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterDatabaseDiscoveryRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterDatabaseDiscoveryRuleStatement;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
 import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandler.java
index 03c1340..10befdd 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandler.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import org.apache.shardingsphere.distsql.parser.segment.rdl.EncryptRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterEncryptRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterEncryptRuleStatement;
 import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
 import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java
index 8d590a6..58dbda7 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandler.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import com.google.common.base.Strings;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ReadwriteSplittingRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
 import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandler.java
index bca9785..a111363 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandler.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import com.google.common.base.Predicate;
 import com.google.common.base.Splitter;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBindingTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBindingTableRulesStatement;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
 import org.apache.shardingsphere.proxy.backend.exception.DuplicateBindingTablesException;
 import org.apache.shardingsphere.proxy.backend.exception.ShardingBindingTableRulesNotExistsException;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandler.java
index 67ccafb..02495b0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandler.java
@@ -17,7 +17,7 @@
 
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBroadcastTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBroadcastTableRulesStatement;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
 import org.apache.shardingsphere.proxy.backend.exception.ShardingBroadcastTableRulesNotExistsException;
 import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandler.java
index dff8413..d5e74b5 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandler.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import org.apache.shardingsphere.distsql.parser.segment.TableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingTableRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingTableRuleStatement;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
 import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine;
@@ -78,7 +78,7 @@ public final class AlterShardingTableRuleBackendHandler extends RDLBackendHandle
         if (!notExistTables.isEmpty()) {
             throw new ShardingTableRuleNotExistedException(schemaName, notExistTables);
         }
-        Collection<String> invalidTableAlgorithms = sqlStatement.getTables().stream().map(each -> each.getTableStrategy().getAlgorithmName()).distinct()
+        Collection<String> invalidTableAlgorithms = sqlStatement.getRules().stream().map(each -> each.getTableStrategy().getAlgorithmName()).distinct()
                 .filter(each -> !TypedSPIRegistry.findRegisteredService(ShardingAlgorithm.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
         if (!invalidTableAlgorithms.isEmpty()) {
@@ -117,7 +117,7 @@ public final class AlterShardingTableRuleBackendHandler extends RDLBackendHandle
     }
     
     private Collection<String> getDuplicateTables(final AlterShardingTableRuleStatement sqlStatement) {
-        return sqlStatement.getTables().stream()
+        return sqlStatement.getRules().stream()
                 .collect(Collectors.toMap(TableRuleSegment::getLogicTable, e -> 1, Integer::sum))
                 .entrySet().stream()
                 .filter(entry -> entry.getValue() > 1)
@@ -126,7 +126,7 @@ public final class AlterShardingTableRuleBackendHandler extends RDLBackendHandle
     }
     
     private Collection<String> getAlteredTables(final AlterShardingTableRuleStatement sqlStatement) {
-        return sqlStatement.getTables().stream().map(TableRuleSegment::getLogicTable).collect(Collectors.toList());
+        return sqlStatement.getRules().stream().map(TableRuleSegment::getLogicTable).collect(Collectors.toList());
     }
     
     private Collection<String> getShardingTables(final ShardingRuleConfiguration shardingRuleConfiguration) {
@@ -138,12 +138,12 @@ public final class AlterShardingTableRuleBackendHandler extends RDLBackendHandle
     
     private Collection<String> getResources(final AlterShardingTableRuleStatement sqlStatement) {
         Collection<String> result = new LinkedHashSet<>();
-        sqlStatement.getTables().forEach(each -> result.addAll(each.getDataSources()));
+        sqlStatement.getRules().forEach(each -> result.addAll(each.getDataSources()));
         return result;
     }
     
     private Collection<String> getKeyGenerators(final AlterShardingTableRuleStatement sqlStatement) {
-        return sqlStatement.getTables().stream().filter(each -> Objects.nonNull(each.getKeyGenerateStrategy()))
+        return sqlStatement.getRules().stream().filter(each -> Objects.nonNull(each.getKeyGenerateStrategy()))
                 .map(each -> each.getKeyGenerateStrategy().getAlgorithmName()).collect(Collectors.toSet());
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandler.java
index a8b3736..f03480d 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandler.java
@@ -69,13 +69,13 @@ public final class CreateShardingTableRuleBackendHandler extends RDLBackendHandl
             throw new ResourceNotExistedException(schemaName, notExistResources);
         }
         Collection<String> existLogicTables = getAllTables(schemaName);
-        Set<String> duplicateTableNames = sqlStatement.getTables().stream().collect(Collectors.toMap(TableRuleSegment::getLogicTable, each -> 1, Integer::sum))
+        Set<String> duplicateTableNames = sqlStatement.getRules().stream().collect(Collectors.toMap(TableRuleSegment::getLogicTable, each -> 1, Integer::sum))
                 .entrySet().stream().filter(entry -> entry.getValue() > 1).map(Entry::getKey).collect(Collectors.toSet());
-        duplicateTableNames.addAll(sqlStatement.getTables().stream().map(TableRuleSegment::getLogicTable).filter(existLogicTables::contains).collect(Collectors.toSet()));
+        duplicateTableNames.addAll(sqlStatement.getRules().stream().map(TableRuleSegment::getLogicTable).filter(existLogicTables::contains).collect(Collectors.toSet()));
         if (!duplicateTableNames.isEmpty()) {
             throw new DuplicateTablesException(duplicateTableNames);
         }
-        Collection<String> invalidTableAlgorithms = sqlStatement.getTables().stream().map(each -> each.getTableStrategy().getAlgorithmName()).distinct()
+        Collection<String> invalidTableAlgorithms = sqlStatement.getRules().stream().map(each -> each.getTableStrategy().getAlgorithmName()).distinct()
                 .filter(each -> !TypedSPIRegistry.findRegisteredService(ShardingAlgorithm.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
         if (!invalidTableAlgorithms.isEmpty()) {
@@ -120,12 +120,12 @@ public final class CreateShardingTableRuleBackendHandler extends RDLBackendHandl
     
     private Collection<String> getResources(final CreateShardingTableRuleStatement sqlStatement) {
         Collection<String> result = new LinkedHashSet<>();
-        sqlStatement.getTables().forEach(each -> result.addAll(each.getDataSources()));
+        sqlStatement.getRules().forEach(each -> result.addAll(each.getDataSources()));
         return result;
     }
     
     private Collection<String> getKeyGenerators(final CreateShardingTableRuleStatement sqlStatement) {
-        return sqlStatement.getTables().stream().filter(each -> Objects.nonNull(each.getKeyGenerateStrategy()))
+        return sqlStatement.getRules().stream().filter(each -> Objects.nonNull(each.getKeyGenerateStrategy()))
                 .map(each -> each.getKeyGenerateStrategy().getAlgorithmName()).collect(Collectors.toSet());
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java
index d5fe21b..40a40f1 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java
@@ -51,7 +51,7 @@ public final class DropResourceBackendHandler extends SchemaRequiredBackendHandl
     
     @Override
     public ResponseHeader execute(final String schemaName, final DropResourceStatement sqlStatement) {
-        Collection<String> toBeDroppedResourceNames = sqlStatement.getResourceNames();
+        Collection<String> toBeDroppedResourceNames = sqlStatement.getNames();
         check(schemaName, toBeDroppedResourceNames);
         drop(schemaName, toBeDroppedResourceNames);
         post(schemaName, toBeDroppedResourceNames);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/RDLBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/RDLBackendHandlerFactoryTest.java
index 2094f60..c079547 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/RDLBackendHandlerFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/RDLBackendHandlerFactoryTest.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.proxy.backend.text.distsql;
 
 import lombok.SneakyThrows;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.AddResourceStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.create.impl.CreateShardingTableRuleStatement;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandlerTest.java
index 82f04f7..3ecb729 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterDatabaseDiscoveryRuleBackendHandlerTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleCon
 import org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
 import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.DatabaseDiscoveryRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterDatabaseDiscoveryRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterDatabaseDiscoveryRuleStatement;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandlerTest.java
index 9d8378e..74c3990 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterEncryptRuleBackendHandlerTest.java
@@ -21,7 +21,7 @@ import com.google.common.collect.Maps;
 import org.apache.shardingsphere.distsql.parser.segment.FunctionSegment;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.EncryptColumnSegment;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.EncryptRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterEncryptRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterEncryptRuleStatement;
 import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
 import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
@@ -75,7 +75,7 @@ public final class AlterEncryptRuleBackendHandlerTest {
     @Mock
     private EncryptTableRuleConfiguration encryptTableRuleConfiguration;
     
-    private AlterEncryptRuleBackendHandler handler = new AlterEncryptRuleBackendHandler(sqlStatement, backendConnection);
+    private final AlterEncryptRuleBackendHandler handler = new AlterEncryptRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandlerTest.java
index 0481966..e1e93d3 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterReadwriteSplittingRuleBackendHandlerTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import com.google.common.collect.Maps;
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ReadwriteSplittingRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterReadwriteSplittingRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
@@ -78,11 +78,11 @@ public final class AlterReadwriteSplittingRuleBackendHandlerTest {
 
     @Mock
     private ShardingSphereResource shardingSphereResource;
-
+    
     @Mock
     private ReadwriteSplittingDataSourceRuleConfiguration readwriteSplittingDataSourceRuleConfiguration;
     
-    private AlterReadwriteSplittingRuleBackendHandler handler = new AlterReadwriteSplittingRuleBackendHandler(sqlStatement, backendConnection);
+    private final AlterReadwriteSplittingRuleBackendHandler handler = new AlterReadwriteSplittingRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -145,7 +145,7 @@ public final class AlterReadwriteSplittingRuleBackendHandlerTest {
         when(readwriteSplittingDataSourceRuleConfiguration.getName()).thenReturn("pr_ds");
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test(expected = InvalidLoadBalancersException.class)
     public void assertExecuteWithInvalidLoadBalancer() {
         ReadwriteSplittingRuleSegment readwriteSplittingRuleSegment = new ReadwriteSplittingRuleSegment();
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandlerTest.java
index 11a1da7..414ae67 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBindingTableRulesBackendHandlerTest.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import org.apache.shardingsphere.distsql.parser.segment.rdl.ShardingBindingTableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBindingTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBindingTableRulesStatement;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import org.apache.shardingsphere.infra.metadata.rule.ShardingSphereRuleMetaData;
@@ -38,6 +38,7 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.Arrays;
+import java.util.Collections;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -65,14 +66,14 @@ public final class AlterShardingBindingTableRulesBackendHandlerTest {
     @Before
     public void setUp() throws Exception {
         ProxyContext.getInstance().init(metaDataContexts, transactionContexts);
-        when(metaDataContexts.getAllSchemaNames()).thenReturn(Arrays.asList("test"));
+        when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singletonList("test"));
         when(metaDataContexts.getMetaData(eq("test"))).thenReturn(shardingSphereMetaData);
         when(shardingSphereMetaData.getRuleMetaData()).thenReturn(shardingSphereRuleMetaData);
     }
     
     @Test
     public void assertExecute() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(buildShardingRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singletonList(buildShardingRuleConfiguration()));
         AlterShardingBindingTableRulesStatement statement = buildShardingTableRuleStatement();
         AlterShardingBindingTableRulesBackendHandler handler = new AlterShardingBindingTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
@@ -82,7 +83,7 @@ public final class AlterShardingBindingTableRulesBackendHandlerTest {
     
     @Test(expected = ShardingTableRuleNotExistedException.class)
     public void assertExecuteWithNotExistTableRule() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(new ShardingRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new ShardingRuleConfiguration()));
         AlterShardingBindingTableRulesStatement statement = buildShardingTableRuleStatement();
         AlterShardingBindingTableRulesBackendHandler handler = new AlterShardingBindingTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
@@ -92,41 +93,35 @@ public final class AlterShardingBindingTableRulesBackendHandlerTest {
     
     @Test(expected = DuplicateBindingTablesException.class)
     public void assertExecuteWithDuplicateTables() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(buildShardingRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singletonList(buildShardingRuleConfiguration()));
         AlterShardingBindingTableRulesStatement statement = buildDuplicateShardingTableRuleStatement();
         AlterShardingBindingTableRulesBackendHandler handler = new AlterShardingBindingTableRulesBackendHandler(statement, backendConnection);
         handler.execute("test", statement);
     }
     
     private ShardingRuleConfiguration buildShardingRuleConfiguration() {
-        ShardingRuleConfiguration shardingRuleConfiguration = new ShardingRuleConfiguration();
-        shardingRuleConfiguration.getTables().add(new ShardingTableRuleConfiguration("t_order"));
-        shardingRuleConfiguration.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
-        shardingRuleConfiguration.getTables().add(new ShardingTableRuleConfiguration("t_1"));
-        shardingRuleConfiguration.getTables().add(new ShardingTableRuleConfiguration("t_2"));
-        shardingRuleConfiguration.getBindingTableGroups().addAll(Arrays.asList("t_order,t_order_item"));
-        return shardingRuleConfiguration;
+        ShardingRuleConfiguration result = new ShardingRuleConfiguration();
+        result.getTables().add(new ShardingTableRuleConfiguration("t_order"));
+        result.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
+        result.getTables().add(new ShardingTableRuleConfiguration("t_1"));
+        result.getTables().add(new ShardingTableRuleConfiguration("t_2"));
+        result.getBindingTableGroups().addAll(Collections.singletonList("t_order,t_order_item"));
+        return result;
     }
     
     private AlterShardingBindingTableRulesStatement buildShardingTableRuleStatement() {
-        AlterShardingBindingTableRulesStatement result = new AlterShardingBindingTableRulesStatement();
         ShardingBindingTableRuleSegment segment = new ShardingBindingTableRuleSegment();
         segment.setTables("t_order,t_order_item");
-        result.getRules().add(segment);
         ShardingBindingTableRuleSegment segmentAnother = new ShardingBindingTableRuleSegment();
         segmentAnother.setTables("t_1,t_2");
-        result.getRules().add(segmentAnother);
-        return result;
+        return new AlterShardingBindingTableRulesStatement(Arrays.asList(segment, segmentAnother));
     }
     
     private AlterShardingBindingTableRulesStatement buildDuplicateShardingTableRuleStatement() {
-        AlterShardingBindingTableRulesStatement result = new AlterShardingBindingTableRulesStatement();
         ShardingBindingTableRuleSegment segment = new ShardingBindingTableRuleSegment();
         segment.setTables("t_order,t_order_item");
-        result.getRules().add(segment);
         ShardingBindingTableRuleSegment segmentAnother = new ShardingBindingTableRuleSegment();
         segmentAnother.setTables("t_order,t_order_item");
-        result.getRules().add(segmentAnother);
-        return result;
+        return new AlterShardingBindingTableRulesStatement(Arrays.asList(segment, segmentAnother));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandlerTest.java
index 2fd5d16..7785a93 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingBroadcastTableRulesBackendHandlerTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingBroadcastTableRulesStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingBroadcastTableRulesStatement;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
 import org.apache.shardingsphere.infra.metadata.rule.ShardingSphereRuleMetaData;
@@ -35,7 +35,7 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -63,7 +63,7 @@ public final class AlterShardingBroadcastTableRulesBackendHandlerTest {
     @Before
     public void setUp() throws Exception {
         ProxyContext.getInstance().init(metaDataContexts, transactionContexts);
-        when(metaDataContexts.getAllSchemaNames()).thenReturn(Arrays.asList("test"));
+        when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singleton("test"));
         when(metaDataContexts.getMetaData(eq("test"))).thenReturn(shardingSphereMetaData);
         when(shardingSphereMetaData.getRuleMetaData()).thenReturn(shardingSphereRuleMetaData);
     }
@@ -71,8 +71,7 @@ public final class AlterShardingBroadcastTableRulesBackendHandlerTest {
     @Test(expected = ShardingBroadcastTableRulesNotExistsException.class)
     public void assertExecuteWithoutShardingRuleConfiguration() {
         when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(new ArrayList<>());
-        AlterShardingBroadcastTableRulesStatement statement = new AlterShardingBroadcastTableRulesStatement();
-        statement.getTables().add("t_1");
+        AlterShardingBroadcastTableRulesStatement statement = new AlterShardingBroadcastTableRulesStatement(Collections.singleton("t_1"));
         AlterShardingBroadcastTableRulesBackendHandler handler = new AlterShardingBroadcastTableRulesBackendHandler(statement, backendConnection);
         handler.execute("test", statement);
     }
@@ -81,9 +80,8 @@ public final class AlterShardingBroadcastTableRulesBackendHandlerTest {
     public void assertExecuteWithExistShardingBroadcastTableRules() {
         ShardingRuleConfiguration shardingRuleConfiguration = new ShardingRuleConfiguration();
         shardingRuleConfiguration.getBroadcastTables().add("t_1");
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(shardingRuleConfiguration));
-        AlterShardingBroadcastTableRulesStatement statement = new AlterShardingBroadcastTableRulesStatement();
-        statement.getTables().add("t_2");
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(shardingRuleConfiguration));
+        AlterShardingBroadcastTableRulesStatement statement = new AlterShardingBroadcastTableRulesStatement(Collections.singleton("t_2"));
         AlterShardingBroadcastTableRulesBackendHandler handler = new AlterShardingBroadcastTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
         assertNotNull(responseHeader);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandlerTest.java
index 3e50a61..86aa0ba 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AlterShardingTableRuleBackendHandlerTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
 import org.apache.shardingsphere.distsql.parser.segment.FunctionSegment;
 import org.apache.shardingsphere.distsql.parser.segment.TableRuleSegment;
-import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterShardingTableRuleStatement;
+import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.impl.AlterShardingTableRuleStatement;
 import org.apache.shardingsphere.infra.config.RuleConfiguration;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
 import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
@@ -82,7 +82,7 @@ public final class AlterShardingTableRuleBackendHandlerTest {
     @Mock
     private ShardingSphereResource shardingSphereResource;
     
-    private AlterShardingTableRuleBackendHandler handler = new AlterShardingTableRuleBackendHandler(sqlStatement, backendConnection);
+    private final AlterShardingTableRuleBackendHandler handler = new AlterShardingTableRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -105,10 +105,10 @@ public final class AlterShardingTableRuleBackendHandlerTest {
         functionSegment.setAlgorithmName("hash_mod");
         functionSegment.setAlgorithmProps(new Properties());
         tableRuleSegment.setTableStrategy(functionSegment);
-        tableRuleSegment.setDataSources(Arrays.asList("ds_0"));
+        tableRuleSegment.setDataSources(Collections.singleton("ds_0"));
         tableRuleSegment.setTableStrategyColumn("order_id");
         when(ruleMetaData.getConfigurations()).thenReturn(buildShardingConfigurations());
-        when(sqlStatement.getTables()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singleton(tableRuleSegment));
         when(shardingSphereMetaData.getResource()).thenReturn(shardingSphereResource);
         Map<String, DataSource> dataSourceMap = mock(Map.class);
         when(shardingSphereResource.getDataSources()).thenReturn(dataSourceMap);
@@ -124,7 +124,7 @@ public final class AlterShardingTableRuleBackendHandlerTest {
         TableRuleSegment tableRuleSegment = new TableRuleSegment();
         tableRuleSegment.setLogicTable("t_order");
         tableRuleSegment.setDataSources(Collections.emptyList());
-        when(sqlStatement.getTables()).thenReturn(Arrays.asList(tableRuleSegment, tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Arrays.asList(tableRuleSegment, tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
     
@@ -134,7 +134,7 @@ public final class AlterShardingTableRuleBackendHandlerTest {
         tableRuleSegment.setLogicTable("t_order_1");
         tableRuleSegment.setDataSources(Collections.emptyList());
         when(ruleMetaData.getConfigurations()).thenReturn(buildShardingConfigurations());
-        when(sqlStatement.getTables()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singleton(tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
     
@@ -146,17 +146,17 @@ public final class AlterShardingTableRuleBackendHandlerTest {
         FunctionSegment shardingAlgorithm = new FunctionSegment();
         shardingAlgorithm.setAlgorithmName("algorithm-not-exist");
         tableRuleSegment.setTableStrategy(shardingAlgorithm);
-        when(sqlStatement.getTables()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singleton(tableRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(buildShardingConfigurations());
         handler.execute("test", sqlStatement);
     }
     
     private Collection<RuleConfiguration> buildShardingConfigurations() {
-        ShardingRuleConfiguration configuration = new ShardingRuleConfiguration();
-        configuration.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
+        ShardingRuleConfiguration config = new ShardingRuleConfiguration();
+        config.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
         ShardingAutoTableRuleConfiguration shardingAutoTableRuleConfiguration = new ShardingAutoTableRuleConfiguration("t_order");
         shardingAutoTableRuleConfiguration.setShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "test"));
-        configuration.getAutoTables().add(shardingAutoTableRuleConfiguration);
-        return new ArrayList<>(Collections.singletonList(configuration));
+        config.getAutoTables().add(shardingAutoTableRuleConfiguration);
+        return new ArrayList<>(Collections.singleton(config));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandlerTest.java
index cc3af47..656a0cf 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandlerTest.java
@@ -78,7 +78,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandlerTest {
     @Mock
     private ShardingSphereResource shardingSphereResource;
     
-    private CreateDatabaseDiscoveryRuleBackendHandler handler = new CreateDatabaseDiscoveryRuleBackendHandler(sqlStatement, backendConnection);
+    private final CreateDatabaseDiscoveryRuleBackendHandler handler = new CreateDatabaseDiscoveryRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandlerTest.java
index ac6f7d7..28ebd9a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandlerTest.java
@@ -71,7 +71,7 @@ public final class CreateEncryptRuleBackendHandlerTest {
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
     
-    private CreateEncryptRuleBackendHandler handler = new CreateEncryptRuleBackendHandler(sqlStatement, backendConnection);
+    private final CreateEncryptRuleBackendHandler handler = new CreateEncryptRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandlerTest.java
index 31300a3..ca50ade 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandlerTest.java
@@ -77,11 +77,11 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
     
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
-
+    
     @Mock
     private ShardingSphereResource shardingSphereResource;
     
-    private CreateReadwriteSplittingRuleBackendHandler handler = new CreateReadwriteSplittingRuleBackendHandler(sqlStatement, backendConnection);
+    private final CreateReadwriteSplittingRuleBackendHandler handler = new CreateReadwriteSplittingRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -124,7 +124,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test
     public void assertExecuteWithExistReadwriteConfiguration() {
         ReadwriteSplittingDataSourceRuleConfiguration readwriteSplittingDataSourceRuleConfiguration
@@ -157,7 +157,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test(expected = InvalidLoadBalancersException.class)
     public void assertExecuteWithInvalidLoadBalancer() {
         ReadwriteSplittingRuleSegment readwriteSplittingRuleSegment = new ReadwriteSplittingRuleSegment();
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBindingTableRulesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBindingTableRulesBackendHandlerTest.java
index ede7bbf..5d11dc0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBindingTableRulesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBindingTableRulesBackendHandlerTest.java
@@ -38,6 +38,7 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.Arrays;
+import java.util.Collections;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -65,14 +66,14 @@ public final class CreateShardingBindingTableRulesBackendHandlerTest {
     @Before
     public void setUp() throws Exception {
         ProxyContext.getInstance().init(metaDataContexts, transactionContexts);
-        when(metaDataContexts.getAllSchemaNames()).thenReturn(Arrays.asList("test"));
+        when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singleton("test"));
         when(metaDataContexts.getMetaData(eq("test"))).thenReturn(shardingSphereMetaData);
         when(shardingSphereMetaData.getRuleMetaData()).thenReturn(shardingSphereRuleMetaData);
     }
     
     @Test
     public void assertExecute() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(buildShardingRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(buildShardingRuleConfiguration()));
         CreateShardingBindingTableRulesStatement statement = buildShardingTableRuleStatement();
         CreateShardingBindingTableRulesBackendHandler handler = new CreateShardingBindingTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
@@ -82,7 +83,7 @@ public final class CreateShardingBindingTableRulesBackendHandlerTest {
     
     @Test(expected = ShardingTableRuleNotExistedException.class)
     public void assertExecuteWithNotExistTableRule() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(new ShardingRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(new ShardingRuleConfiguration()));
         CreateShardingBindingTableRulesStatement statement = buildShardingTableRuleStatement();
         CreateShardingBindingTableRulesBackendHandler handler = new CreateShardingBindingTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
@@ -92,7 +93,7 @@ public final class CreateShardingBindingTableRulesBackendHandlerTest {
     
     @Test(expected = DuplicateBindingTablesException.class)
     public void assertExecuteWithDuplicateTablesInSQL() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(buildShardingRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(buildShardingRuleConfiguration()));
         CreateShardingBindingTableRulesStatement statement = buildDuplicateShardingTableRuleStatement();
         CreateShardingBindingTableRulesBackendHandler handler = new CreateShardingBindingTableRulesBackendHandler(statement, backendConnection);
         handler.execute("test", statement);
@@ -100,7 +101,7 @@ public final class CreateShardingBindingTableRulesBackendHandlerTest {
     
     @Test(expected = DuplicateBindingTablesException.class)
     public void assertExecuteWithDuplicateTablesInShardingRule() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(buildShardingBindingTableRuleConfiguration()));
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(buildShardingBindingTableRuleConfiguration()));
         CreateShardingBindingTableRulesStatement statement = buildShardingTableRuleStatement();
         CreateShardingBindingTableRulesBackendHandler handler = new CreateShardingBindingTableRulesBackendHandler(statement, backendConnection);
         handler.execute("test", statement);
@@ -126,24 +127,18 @@ public final class CreateShardingBindingTableRulesBackendHandlerTest {
     }
     
     private CreateShardingBindingTableRulesStatement buildShardingTableRuleStatement() {
-        CreateShardingBindingTableRulesStatement result = new CreateShardingBindingTableRulesStatement();
         ShardingBindingTableRuleSegment segment = new ShardingBindingTableRuleSegment();
         segment.setTables("t_order,t_order_item");
-        result.getRules().add(segment);
         ShardingBindingTableRuleSegment segmentAnother = new ShardingBindingTableRuleSegment();
         segmentAnother.setTables("t_1,t_2");
-        result.getRules().add(segmentAnother);
-        return result;
+        return new CreateShardingBindingTableRulesStatement(Arrays.asList(segment, segmentAnother));
     }
     
     private CreateShardingBindingTableRulesStatement buildDuplicateShardingTableRuleStatement() {
-        CreateShardingBindingTableRulesStatement result = new CreateShardingBindingTableRulesStatement();
         ShardingBindingTableRuleSegment segment = new ShardingBindingTableRuleSegment();
         segment.setTables("t_order,t_order_item");
-        result.getRules().add(segment);
         ShardingBindingTableRuleSegment segmentAnother = new ShardingBindingTableRuleSegment();
         segmentAnother.setTables("t_order,t_order_item");
-        result.getRules().add(segmentAnother);
-        return result;
+        return new CreateShardingBindingTableRulesStatement(Arrays.asList(segment, segmentAnother));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBroadcastTableRulesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBroadcastTableRulesBackendHandlerTest.java
index bde65ac..af80447 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBroadcastTableRulesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingBroadcastTableRulesBackendHandlerTest.java
@@ -35,7 +35,7 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -63,7 +63,7 @@ public final class CreateShardingBroadcastTableRulesBackendHandlerTest {
     @Before
     public void setUp() throws Exception {
         ProxyContext.getInstance().init(metaDataContexts, transactionContexts);
-        when(metaDataContexts.getAllSchemaNames()).thenReturn(Arrays.asList("test"));
+        when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singleton("test"));
         when(metaDataContexts.getMetaData(eq("test"))).thenReturn(shardingSphereMetaData);
         when(shardingSphereMetaData.getRuleMetaData()).thenReturn(shardingSphereRuleMetaData);
     }
@@ -71,8 +71,7 @@ public final class CreateShardingBroadcastTableRulesBackendHandlerTest {
     @Test
     public void assertExecuteWithoutShardingRuleConfiguration() {
         when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(new ArrayList<>());
-        CreateShardingBroadcastTableRulesStatement statement = new CreateShardingBroadcastTableRulesStatement();
-        statement.getTables().add("t_1");
+        CreateShardingBroadcastTableRulesStatement statement = new CreateShardingBroadcastTableRulesStatement(Collections.singleton("t_1"));
         CreateShardingBroadcastTableRulesBackendHandler handler = new CreateShardingBroadcastTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
         assertNotNull(responseHeader);
@@ -83,18 +82,16 @@ public final class CreateShardingBroadcastTableRulesBackendHandlerTest {
     public void assertExecuteWithExistShardingBroadcastTableRules() {
         ShardingRuleConfiguration shardingRuleConfiguration = new ShardingRuleConfiguration();
         shardingRuleConfiguration.getBroadcastTables().add("t_1");
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(shardingRuleConfiguration));
-        CreateShardingBroadcastTableRulesStatement statement = new CreateShardingBroadcastTableRulesStatement();
-        statement.getTables().add("t_1");
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(shardingRuleConfiguration));
+        CreateShardingBroadcastTableRulesStatement statement = new CreateShardingBroadcastTableRulesStatement(Collections.singleton("t_1"));
         CreateShardingBroadcastTableRulesBackendHandler handler = new CreateShardingBroadcastTableRulesBackendHandler(statement, backendConnection);
         handler.execute("test", statement);
     }
     
     @Test
     public void assertExecuteWithNotExistShardingBroadcastTableRules() {
-        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Arrays.asList(new ShardingRuleConfiguration()));
-        CreateShardingBroadcastTableRulesStatement statement = new CreateShardingBroadcastTableRulesStatement();
-        statement.getTables().add("t_1");
+        when(shardingSphereRuleMetaData.getConfigurations()).thenReturn(Collections.singleton(new ShardingRuleConfiguration()));
+        CreateShardingBroadcastTableRulesStatement statement = new CreateShardingBroadcastTableRulesStatement(Collections.singleton("t_1"));
         CreateShardingBroadcastTableRulesBackendHandler handler = new CreateShardingBroadcastTableRulesBackendHandler(statement, backendConnection);
         ResponseHeader responseHeader = handler.execute("test", statement);
         assertNotNull(responseHeader);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandlerTest.java
index cfcb382..41e8b6a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateShardingTableRuleBackendHandlerTest.java
@@ -65,20 +65,20 @@ public final class CreateShardingTableRuleBackendHandlerTest {
     
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
-
+    
     @Mock
     private ShardingSphereSchema shardingSphereSchema;
     
-    private CreateShardingTableRuleBackendHandler handler = new CreateShardingTableRuleBackendHandler(sqlStatement, backendConnection);
+    private final CreateShardingTableRuleBackendHandler handler = new CreateShardingTableRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
         ProxyContext.getInstance().init(metaDataContexts, transactionContexts);
-        when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singletonList("test"));
+        when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singleton("test"));
         when(metaDataContexts.getMetaData(eq("test"))).thenReturn(shardingSphereMetaData);
         when(shardingSphereMetaData.getRuleMetaData()).thenReturn(ruleMetaData);
         when(shardingSphereMetaData.getSchema()).thenReturn(shardingSphereSchema);
-        when(shardingSphereSchema.getAllTableNames()).thenReturn(Collections.singletonList("t_order"));
+        when(shardingSphereSchema.getAllTableNames()).thenReturn(Collections.singleton("t_order"));
     }
     
     @Test
@@ -99,7 +99,7 @@ public final class CreateShardingTableRuleBackendHandlerTest {
         TableRuleSegment tableRuleSegment = new TableRuleSegment();
         tableRuleSegment.setLogicTable("t_order");
         tableRuleSegment.setDataSources(Collections.emptyList());
-        when(sqlStatement.getTables()).thenReturn(Arrays.asList(tableRuleSegment, tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Arrays.asList(tableRuleSegment, tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
     
@@ -108,7 +108,7 @@ public final class CreateShardingTableRuleBackendHandlerTest {
         TableRuleSegment tableRuleSegment = new TableRuleSegment();
         tableRuleSegment.setLogicTable("t_order");
         tableRuleSegment.setDataSources(Collections.emptyList());
-        when(sqlStatement.getTables()).thenReturn(Collections.singletonList(tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singleton(tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
     
@@ -120,7 +120,7 @@ public final class CreateShardingTableRuleBackendHandlerTest {
         FunctionSegment shardingAlgorithm = new FunctionSegment();
         shardingAlgorithm.setAlgorithmName("algorithm-not-exist");
         tableRuleSegment.setTableStrategy(shardingAlgorithm);
-        when(sqlStatement.getTables()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singleton(tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java
index 197a902..8a4d377 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java
@@ -47,13 +47,13 @@ public final class DropDatabaseBackendHandlerTest {
     
     @Mock
     private DropDatabaseStatement sqlStatement;
-
+    
     @Mock
     private TransactionContexts transactionContexts;
     
     @Mock
     private MetaDataContexts metaDataContexts;
-
+    
     private DropDatabaseBackendHandler handler;
     
     @Before
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseDiscoveryRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseDiscoveryRuleBackendHandlerTest.java
index c2691a5..e047970 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseDiscoveryRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseDiscoveryRuleBackendHandlerTest.java
@@ -67,14 +67,14 @@ public final class DropDatabaseDiscoveryRuleBackendHandlerTest {
     
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
-
+    
     @Mock
     private DatabaseDiscoveryDataSourceRuleConfiguration databaseDiscoveryDataSourceRuleConfiguration;
-
+    
     @Mock
     private ShardingSphereAlgorithmConfiguration shardingSphereAlgorithmConfiguration;
     
-    private DropDatabaseDiscoveryRuleBackendHandler handler = new DropDatabaseDiscoveryRuleBackendHandler(sqlStatement, backendConnection);
+    private final DropDatabaseDiscoveryRuleBackendHandler handler = new DropDatabaseDiscoveryRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -89,9 +89,8 @@ public final class DropDatabaseDiscoveryRuleBackendHandlerTest {
         when(sqlStatement.getRuleNames()).thenReturn(Collections.singletonList("ha_group"));
         Map<String, ShardingSphereAlgorithmConfiguration> discoveryTypes = new HashMap<>(1, 1);
         discoveryTypes.put("pr_ds_MGR", shardingSphereAlgorithmConfiguration);
-        when(ruleMetaData.getConfigurations()).thenReturn(new LinkedList<>(Collections
-                .singletonList(new DatabaseDiscoveryRuleConfiguration(new LinkedList<>(Collections
-                        .singleton(databaseDiscoveryDataSourceRuleConfiguration)), discoveryTypes))));
+        when(ruleMetaData.getConfigurations()).thenReturn(new LinkedList<>(
+                Collections.singleton(new DatabaseDiscoveryRuleConfiguration(new LinkedList<>(Collections.singleton(databaseDiscoveryDataSourceRuleConfiguration)), discoveryTypes))));
         when(databaseDiscoveryDataSourceRuleConfiguration.getName()).thenReturn("ha_group");
         when(databaseDiscoveryDataSourceRuleConfiguration.getDiscoveryTypeName()).thenReturn("pr_ds_MGR");
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
@@ -104,7 +103,7 @@ public final class DropDatabaseDiscoveryRuleBackendHandlerTest {
         when(ruleMetaData.getConfigurations()).thenReturn(Collections.emptyList());
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test(expected = DatabaseDiscoveryRulesNotExistedException.class)
     public void assertExecuteWithNoDroppedDatabaseDiscoveryRules() {
         when(sqlStatement.getRuleNames()).thenReturn(Collections.singletonList("ha_group"));
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropEncryptRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropEncryptRuleBackendHandlerTest.java
index 5c498de..9cfd36e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropEncryptRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropEncryptRuleBackendHandlerTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
-import com.google.common.collect.Maps;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl.DropEncryptRuleStatement;
 import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
 import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
@@ -46,7 +45,6 @@ import java.util.Map;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
 
 @RunWith(MockitoJUnitRunner.class)
@@ -69,20 +67,20 @@ public final class DropEncryptRuleBackendHandlerTest {
     
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
-
+    
     @Mock
     private EncryptTableRuleConfiguration encryptTableRuleConfiguration;
-
+    
     @Mock
     private ShardingSphereAlgorithmConfiguration shardingSphereAlgorithmConfiguration;
     
-    private DropEncryptRuleBackendHandler handler = new DropEncryptRuleBackendHandler(sqlStatement, backendConnection);
+    private final DropEncryptRuleBackendHandler handler = new DropEncryptRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
         ProxyContext.getInstance().init(metaDataContexts, transactionContexts);
         when(metaDataContexts.getAllSchemaNames()).thenReturn(Collections.singletonList("test"));
-        when(metaDataContexts.getMetaData(eq("test"))).thenReturn(shardingSphereMetaData);
+        when(metaDataContexts.getMetaData("test")).thenReturn(shardingSphereMetaData);
         when(shardingSphereMetaData.getRuleMetaData()).thenReturn(ruleMetaData);
     }
     
@@ -91,9 +89,8 @@ public final class DropEncryptRuleBackendHandlerTest {
         when(sqlStatement.getTables()).thenReturn(Collections.singletonList("t_encrypt"));
         Map<String, ShardingSphereAlgorithmConfiguration> encryptors = new HashMap<>(1, 1);
         encryptors.put("t_encrypt_user_id_MD5", shardingSphereAlgorithmConfiguration);
-        when(ruleMetaData.getConfigurations()).thenReturn(new LinkedList<>(Collections
-                .singletonList(new EncryptRuleConfiguration(new LinkedList<>(Collections
-                        .singleton(encryptTableRuleConfiguration)), encryptors))));
+        when(ruleMetaData.getConfigurations()).thenReturn(
+                new LinkedList<>(Collections.singleton(new EncryptRuleConfiguration(new LinkedList<>(Collections.singleton(encryptTableRuleConfiguration)), encryptors))));
         when(encryptTableRuleConfiguration.getName()).thenReturn("t_encrypt");
         when(encryptTableRuleConfiguration.getColumns()).thenReturn(buildColumnRuleConfigurations());
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
@@ -106,16 +103,15 @@ public final class DropEncryptRuleBackendHandlerTest {
         when(ruleMetaData.getConfigurations()).thenReturn(Collections.emptyList());
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test(expected = EncryptRulesNotExistedException.class)
     public void assertExecuteWithNoDroppedEncryptRule() {
         when(sqlStatement.getTables()).thenReturn(Collections.singletonList("t_encrypt"));
-        when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new EncryptRuleConfiguration(Collections.emptyList(), Maps.newHashMap())));
+        when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new EncryptRuleConfiguration(Collections.emptyList(), Collections.emptyMap())));
         handler.execute("test", sqlStatement);
     }
-
+    
     private Collection<EncryptColumnRuleConfiguration> buildColumnRuleConfigurations() {
-        return Collections.singleton(new EncryptColumnRuleConfiguration("user_id", "user_cipher",
-                "", "user_plain", "t_encrypt_user_id_MD5"));
+        return Collections.singleton(new EncryptColumnRuleConfiguration("user_id", "user_cipher", "", "user_plain", "t_encrypt_user_id_MD5"));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropReadwriteSplittingRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropReadwriteSplittingRuleBackendHandlerTest.java
index baa361f..64cdacb 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropReadwriteSplittingRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropReadwriteSplittingRuleBackendHandlerTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
 
-import com.google.common.collect.Maps;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl.DropReadwriteSplittingRuleStatement;
 import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
 import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
@@ -69,14 +68,14 @@ public final class DropReadwriteSplittingRuleBackendHandlerTest {
     
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
-
+    
     @Mock
     private ReadwriteSplittingDataSourceRuleConfiguration readwriteSplittingDataSourceRuleConfiguration;
-
+    
     @Mock
     private ShardingSphereAlgorithmConfiguration shardingSphereAlgorithmConfiguration;
     
-    private DropReadwriteSplittingRuleBackendHandler handler = new DropReadwriteSplittingRuleBackendHandler(sqlStatement, backendConnection);
+    private final DropReadwriteSplittingRuleBackendHandler handler = new DropReadwriteSplittingRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -92,9 +91,8 @@ public final class DropReadwriteSplittingRuleBackendHandlerTest {
         when(sqlStatement.getRuleNames()).thenReturn(Collections.singletonList("pr_ds"));
         Map<String, ShardingSphereAlgorithmConfiguration> loadBalancers = new HashMap<>(1, 1);
         loadBalancers.put("pr_ds", shardingSphereAlgorithmConfiguration);
-        when(ruleMetaData.getConfigurations()).thenReturn(new LinkedList<>(Collections
-                .singletonList(new ReadwriteSplittingRuleConfiguration(new LinkedList<>(Collections
-                        .singleton(readwriteSplittingDataSourceRuleConfiguration)), loadBalancers))));
+        when(ruleMetaData.getConfigurations()).thenReturn(new LinkedList<>(
+                Collections.singleton(new ReadwriteSplittingRuleConfiguration(new LinkedList<>(Collections.singleton(readwriteSplittingDataSourceRuleConfiguration)), loadBalancers))));
         when(readwriteSplittingDataSourceRuleConfiguration.getName()).thenReturn("pr_ds");
         when(readwriteSplittingDataSourceRuleConfiguration.getLoadBalancerName()).thenReturn("pr_ds");
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
@@ -110,8 +108,8 @@ public final class DropReadwriteSplittingRuleBackendHandlerTest {
 
     @Test(expected = ReadwriteSplittingRulesNotExistedException.class)
     public void assertExecuteWithNoDroppedReadwriteSplittingRules() {
-        when(sqlStatement.getRuleNames()).thenReturn(Collections.singletonList("pr_ds"));
-        when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new ReadwriteSplittingRuleConfiguration(Collections.emptyList(), Maps.newHashMap())));
+        when(sqlStatement.getRuleNames()).thenReturn(Collections.singleton("pr_ds"));
+        when(ruleMetaData.getConfigurations()).thenReturn(Collections.singleton(new ReadwriteSplittingRuleConfiguration(Collections.emptyList(), Collections.emptyMap())));
         handler.execute("test", sqlStatement);
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBindingTableRulesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBindingTableRulesBackendHandlerTest.java
index 67785ed..d04d085 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBindingTableRulesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBindingTableRulesBackendHandlerTest.java
@@ -67,8 +67,8 @@ public final class DropShardingBindingTableRulesBackendHandlerTest {
     
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
-
-    private DropShardingBindingTableRulesBackendHandler handler = new DropShardingBindingTableRulesBackendHandler(sqlStatement, backendConnection);
+    
+    private final DropShardingBindingTableRulesBackendHandler handler = new DropShardingBindingTableRulesBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -82,29 +82,28 @@ public final class DropShardingBindingTableRulesBackendHandlerTest {
     public void assertExecuteWithoutShardingRule() {
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test(expected = ShardingBindingTableRulesNotExistsException.class)
     public void assertExecuteWithNotExistBindingTableRule() {
         when(ruleMetaData.getConfigurations()).thenReturn(Arrays.asList(new ShardingRuleConfiguration()));
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test
     public void assertExecute() {
         when(ruleMetaData.getConfigurations()).thenReturn(buildShardingConfigurations());
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
         assertNotNull(responseHeader);
         assertTrue(responseHeader instanceof UpdateResponseHeader);
-        ShardingRuleConfiguration shardingRuleConfiguration = (ShardingRuleConfiguration) ProxyContext.getInstance()
-                .getMetaData("test").getRuleMetaData().getConfigurations().iterator().next();
-        assertTrue(shardingRuleConfiguration.getBindingTableGroups().isEmpty());
+        ShardingRuleConfiguration shardingRuleConfig = (ShardingRuleConfiguration) ProxyContext.getInstance().getMetaData("test").getRuleMetaData().getConfigurations().iterator().next();
+        assertTrue(shardingRuleConfig.getBindingTableGroups().isEmpty());
     }
     
     private Collection<RuleConfiguration> buildShardingConfigurations() {
-        ShardingRuleConfiguration configuration = new ShardingRuleConfiguration();
-        configuration.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
-        configuration.getAutoTables().add(new ShardingAutoTableRuleConfiguration("t_order"));
-        configuration.getBindingTableGroups().add("t_order,t_order_item");
-        return new ArrayList<>(Collections.singletonList(configuration));
+        ShardingRuleConfiguration config = new ShardingRuleConfiguration();
+        config.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
+        config.getAutoTables().add(new ShardingAutoTableRuleConfiguration("t_order"));
+        config.getBindingTableGroups().add("t_order,t_order_item");
+        return new ArrayList<>(Collections.singleton(config));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBroadcastTableRulesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBroadcastTableRulesBackendHandlerTest.java
index 19e7dda..7213f2a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBroadcastTableRulesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingBroadcastTableRulesBackendHandlerTest.java
@@ -38,7 +38,6 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 
@@ -68,7 +67,7 @@ public final class DropShardingBroadcastTableRulesBackendHandlerTest {
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
     
-    private DropShardingBroadcastTableRulesBackendHandler handler = new DropShardingBroadcastTableRulesBackendHandler(sqlStatement, backendConnection);
+    private final DropShardingBroadcastTableRulesBackendHandler handler = new DropShardingBroadcastTableRulesBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -85,7 +84,7 @@ public final class DropShardingBroadcastTableRulesBackendHandlerTest {
 
     @Test(expected = ShardingBroadcastTableRulesNotExistsException.class)
     public void assertExecuteWithNotExistBroadcastTableRule() {
-        when(ruleMetaData.getConfigurations()).thenReturn(Arrays.asList(new ShardingRuleConfiguration()));
+        when(ruleMetaData.getConfigurations()).thenReturn(Collections.singleton(new ShardingRuleConfiguration()));
         handler.execute("test", sqlStatement);
     }
 
@@ -95,16 +94,15 @@ public final class DropShardingBroadcastTableRulesBackendHandlerTest {
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
         assertNotNull(responseHeader);
         assertTrue(responseHeader instanceof UpdateResponseHeader);
-        ShardingRuleConfiguration shardingRuleConfiguration = (ShardingRuleConfiguration) ProxyContext.getInstance()
-                .getMetaData("test").getRuleMetaData().getConfigurations().iterator().next();
-        assertTrue(shardingRuleConfiguration.getBroadcastTables().isEmpty());
+        ShardingRuleConfiguration shardingRuleConfig = (ShardingRuleConfiguration) ProxyContext.getInstance().getMetaData("test").getRuleMetaData().getConfigurations().iterator().next();
+        assertTrue(shardingRuleConfig.getBroadcastTables().isEmpty());
     }
     
     private Collection<RuleConfiguration> buildShardingConfigurations() {
-        ShardingRuleConfiguration configuration = new ShardingRuleConfiguration();
-        configuration.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
-        configuration.getAutoTables().add(new ShardingAutoTableRuleConfiguration("t_order"));
-        configuration.getBroadcastTables().add("t_order");
-        return new ArrayList<>(Collections.singletonList(configuration));
+        ShardingRuleConfiguration config = new ShardingRuleConfiguration();
+        config.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
+        config.getAutoTables().add(new ShardingAutoTableRuleConfiguration("t_order"));
+        config.getBroadcastTables().add("t_order");
+        return new ArrayList<>(Collections.singleton(config));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingTableRuleBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingTableRuleBackendHandlerTest.java
index 1cf2366..e900f4a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingTableRuleBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingTableRuleBackendHandlerTest.java
@@ -42,13 +42,13 @@ import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.LinkedList;
 import java.util.LinkedHashSet;
+import java.util.LinkedList;
 import java.util.stream.Collectors;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.eq;
@@ -75,7 +75,7 @@ public final class DropShardingTableRuleBackendHandlerTest {
     @Mock
     private ShardingSphereRuleMetaData ruleMetaData;
     
-    private DropShardingTableRuleBackendHandler handler = new DropShardingTableRuleBackendHandler(sqlStatement, backendConnection);
+    private final DropShardingTableRuleBackendHandler handler = new DropShardingTableRuleBackendHandler(sqlStatement, backendConnection);
     
     @Before
     public void setUp() {
@@ -89,12 +89,12 @@ public final class DropShardingTableRuleBackendHandlerTest {
     public void assertExecuteWithoutShardingRule() {
         handler.execute("test", sqlStatement);
     }
-
+    
     @Test(expected = ShardingTableRuleNotExistedException.class)
     public void assertExecuteWithNotExistTableRule() {
         TableNameSegment tableRuleSegment = new TableNameSegment(0, 3, new IdentifierValue("t_order"));
-        when(ruleMetaData.getConfigurations()).thenReturn(Arrays.asList(new ShardingRuleConfiguration()));
-        when(sqlStatement.getTableNames()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(ruleMetaData.getConfigurations()).thenReturn(Collections.singleton(new ShardingRuleConfiguration()));
+        when(sqlStatement.getTableNames()).thenReturn(Collections.singleton(tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
@@ -102,7 +102,7 @@ public final class DropShardingTableRuleBackendHandlerTest {
     public void assertExecuteWithBindingTableRule() {
         TableNameSegment tableRuleSegment = new TableNameSegment(0, 3, new IdentifierValue("t_order_item"));
         when(ruleMetaData.getConfigurations()).thenReturn(buildShardingConfigurations());
-        when(sqlStatement.getTableNames()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(sqlStatement.getTableNames()).thenReturn(Collections.singleton(tableRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
@@ -110,36 +110,36 @@ public final class DropShardingTableRuleBackendHandlerTest {
     public void assertExecute() {
         TableNameSegment tableRuleSegment = new TableNameSegment(0, 3, new IdentifierValue("t_order"));
         when(ruleMetaData.getConfigurations()).thenReturn(buildShardingConfigurations());
-        when(sqlStatement.getTableNames()).thenReturn(Arrays.asList(tableRuleSegment));
+        when(sqlStatement.getTableNames()).thenReturn(Collections.singleton(tableRuleSegment));
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
         assertNotNull(responseHeader);
         assertTrue(responseHeader instanceof UpdateResponseHeader);
         ShardingRuleConfiguration shardingRuleConfiguration = (ShardingRuleConfiguration) ProxyContext.getInstance()
                 .getMetaData("test").getRuleMetaData().getConfigurations().iterator().next();
         Collection<String> shardingTables = getShardingTables(shardingRuleConfiguration);
-        assertTrue(!shardingTables.contains("t_order"));
+        assertFalse(shardingTables.contains("t_order"));
         Collection<String> bindingTables = getBindingTables(shardingRuleConfiguration);
         assertTrue(bindingTables.contains("t_order_item"));
     }
     
     private Collection<RuleConfiguration> buildShardingConfigurations() {
-        ShardingRuleConfiguration configuration = new ShardingRuleConfiguration();
-        configuration.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
-        configuration.getAutoTables().add(new ShardingAutoTableRuleConfiguration("t_order"));
-        configuration.setBindingTableGroups(Collections.singletonList("t_order_item"));
-        return new ArrayList<>(Collections.singletonList(configuration));
+        ShardingRuleConfiguration config = new ShardingRuleConfiguration();
+        config.getTables().add(new ShardingTableRuleConfiguration("t_order_item"));
+        config.getAutoTables().add(new ShardingAutoTableRuleConfiguration("t_order"));
+        config.setBindingTableGroups(Collections.singleton("t_order_item"));
+        return new ArrayList<>(Collections.singleton(config));
     }
-
+    
     private Collection<String> getShardingTables(final ShardingRuleConfiguration shardingRuleConfiguration) {
         Collection<String> result = new LinkedList<>();
         result.addAll(shardingRuleConfiguration.getTables().stream().map(ShardingTableRuleConfiguration::getLogicTable).collect(Collectors.toList()));
         result.addAll(shardingRuleConfiguration.getAutoTables().stream().map(ShardingAutoTableRuleConfiguration::getLogicTable).collect(Collectors.toList()));
         return result;
     }
-
+    
     private Collection<String> getBindingTables(final ShardingRuleConfiguration shardingRuleConfiguration) {
-        Collection<String> bindTables = new LinkedHashSet<>();
-        shardingRuleConfiguration.getBindingTableGroups().forEach(each -> bindTables.addAll(Splitter.on(",").splitToList(each)));
-        return bindTables;
+        Collection<String> result = new LinkedHashSet<>();
+        shardingRuleConfiguration.getBindingTableGroups().forEach(each -> result.addAll(Splitter.on(",").splitToList(each)));
+        return result;
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/reset/MySQLComStmtResetExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/reset/MySQLComStmtResetExecutor.java
index e17809c..c225690 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/reset/MySQLComStmtResetExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/reset/MySQLComStmtResetExecutor.java
@@ -37,6 +37,6 @@ public final class MySQLComStmtResetExecutor implements CommandExecutor {
     @Override
     public Collection<DatabasePacket<?>> execute() {
         // TODO we should implement the stmt reset after supporting COM_STMT_SEND_LONG_DATA
-        return Collections.singletonList(new MySQLOKPacket(1));
+        return Collections.singleton(new MySQLOKPacket(1));
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/close/PostgreSQLComCloseExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/close/PostgreSQLComCloseExecutor.java
index f488b68..6504938 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/close/PostgreSQLComCloseExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/close/PostgreSQLComCloseExecutor.java
@@ -64,8 +64,8 @@ public final class PostgreSQLComCloseExecutor implements CommandExecutor {
     }
     
     private Collection<DatabasePacket<?>> closePortal() {
-        PostgreSQLErrorResponsePacket packet = PostgreSQLErrorResponsePacket.newBuilder(PostgreSQLMessageSeverityLevel.ERROR, PostgreSQLErrorCode.FEATURE_NOT_SUPPORTED,
-                "Not implemented: Close portal").build();
-        return Collections.singletonList(packet);
+        PostgreSQLErrorResponsePacket packet = PostgreSQLErrorResponsePacket.newBuilder(
+                PostgreSQLMessageSeverityLevel.ERROR, PostgreSQLErrorCode.FEATURE_NOT_SUPPORTED, "Not implemented: Close portal").build();
+        return Collections.singleton(packet);
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/sync/PostgreSQLComSyncExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/sync/PostgreSQLComSyncExecutor.java
index 70cf416..f278786 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/sync/PostgreSQLComSyncExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/sync/PostgreSQLComSyncExecutor.java
@@ -42,7 +42,7 @@ public final class PostgreSQLComSyncExecutor implements QueryCommandExecutor {
     @Override
     public Collection<DatabasePacket<?>> execute() {
         connectionContext.clearContext();
-        return Collections.singletonList(new PostgreSQLReadyForQueryPacket(backendConnection.getTransactionStatus().isInTransaction()));
+        return Collections.singleton(new PostgreSQLReadyForQueryPacket(backendConnection.getTransactionStatus().isInTransaction()));
     }
     
     @Override
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
index 51d3725..5e11134 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/text/PostgreSQLComQueryExecutor.java
@@ -48,7 +48,7 @@ import java.util.LinkedList;
  * Command query executor for PostgreSQL.
  */
 public final class PostgreSQLComQueryExecutor implements QueryCommandExecutor {
-
+    
     private final TextProtocolBackendHandler textProtocolBackendHandler;
     
     @Getter
@@ -62,10 +62,10 @@ public final class PostgreSQLComQueryExecutor implements QueryCommandExecutor {
     public Collection<DatabasePacket<?>> execute() throws SQLException {
         ResponseHeader responseHeader = textProtocolBackendHandler.execute();
         if (responseHeader instanceof QueryResponseHeader) {
-            return Collections.singletonList(createRowDescriptionPacket((QueryResponseHeader) responseHeader));
+            return Collections.singleton(createRowDescriptionPacket((QueryResponseHeader) responseHeader));
         }
         responseType = ResponseType.UPDATE;
-        return Collections.singletonList(createUpdatePacket((UpdateResponseHeader) responseHeader));
+        return Collections.singleton(createUpdatePacket((UpdateResponseHeader) responseHeader));
     }
     
     private PostgreSQLRowDescriptionPacket createRowDescriptionPacket(final QueryResponseHeader queryResponseHeader) {
diff --git a/shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/test/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/MariaDBXADataSourceDefinitionTest.java b/shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/test/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/MariaDBXADataSo [...]
index 8169d30..3ad2307 100644
--- a/shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/test/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/MariaDBXADataSourceDefinitionTest.java
+++ b/shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/test/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/dialect/MariaDBXADataSourceDefinitionTest.java
@@ -29,6 +29,6 @@ public final class MariaDBXADataSourceDefinitionTest {
     
     @Test
     public void assertGetXADriverClassName() {
-        assertThat(new MariaDBXADataSourceDefinition().getXADriverClassName(), is(Collections.singletonList(MariaDbDataSource.class.getName())));
+        assertThat(new MariaDBXADataSourceDefinition().getXADriverClassName(), is(Collections.singleton(MariaDbDataSource.class.getName())));
     }
 }

Mime
View raw message