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: Rename RDLStatement.rules fields (#10769)
Date Fri, 11 Jun 2021 13:22:13 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 1299174  Rename RDLStatement.rules fields (#10769)
1299174 is described below

commit 1299174b632d9bdb8e5403ad049a44101a663f4c
Author: Liang Zhang <terrymanu@163.com>
AuthorDate: Fri Jun 11 21:21:37 2021 +0800

    Rename RDLStatement.rules fields (#10769)
---
 .../api/DistSQLStatementParserEngineTest.java      | 28 +++++++++++-----------
 .../alter/AlterDatabaseDiscoveryRuleStatement.java |  2 +-
 .../rdl/alter/AlterEncryptRuleStatement.java       |  2 +-
 .../AlterReadwriteSplittingRuleStatement.java      |  2 +-
 .../impl/CreateDatabaseDiscoveryRuleStatement.java |  2 +-
 .../create/impl/CreateEncryptRuleStatement.java    |  2 +-
 .../CreateReadwriteSplittingRuleStatement.java     |  2 +-
 .../DropShardingBindingTableRulesStatement.java    |  2 --
 .../DropShardingBroadcastTableRulesStatement.java  |  2 --
 .../DatabaseDiscoveryRuleStatementConverter.java   |  6 ++---
 .../ReadwriteSplittingRuleStatementConverter.java  |  4 ++--
 .../AlterDatabaseDiscoveryRuleBackendHandler.java  |  8 +++----
 .../rdl/impl/AlterEncryptRuleBackendHandler.java   |  6 ++---
 .../AlterReadwriteSplittingRuleBackendHandler.java |  6 ++---
 .../CreateDatabaseDiscoveryRuleBackendHandler.java | 12 +++++-----
 .../rdl/impl/CreateEncryptRuleBackendHandler.java  |  6 ++---
 ...CreateReadwriteSplittingRuleBackendHandler.java |  6 ++---
 ...terDatabaseDiscoveryRuleBackendHandlerTest.java |  8 +++----
 .../impl/AlterEncryptRuleBackendHandlerTest.java   |  6 ++---
 ...erReadwriteSplittingRuleBackendHandlerTest.java |  8 +++----
 ...ateDatabaseDiscoveryRuleBackendHandlerTest.java |  8 +++----
 .../impl/CreateEncryptRuleBackendHandlerTest.java  |  6 ++---
 ...teReadwriteSplittingRuleBackendHandlerTest.java | 10 ++++----
 23 files changed, 70 insertions(+), 74 deletions(-)

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 bff261c..50a8d8e 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
@@ -331,9 +331,9 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_CREATE_STATIC_READWRITE_SPLITTING_RULE);
         assertTrue(sqlStatement instanceof CreateReadwriteSplittingRuleStatement);
         CreateReadwriteSplittingRuleStatement statement = (CreateReadwriteSplittingRuleStatement) sqlStatement;
-        assertThat(statement.getReadwriteSplittingRules().size(), is(1));
+        assertThat(statement.getRules().size(), is(1));
         List<ReadwriteSplittingRuleSegment> readwriteSplittingRuleSegments
-                = new ArrayList<>(((CreateReadwriteSplittingRuleStatement) sqlStatement).getReadwriteSplittingRules());
+                = new ArrayList<>(((CreateReadwriteSplittingRuleStatement) sqlStatement).getRules());
         assertThat(readwriteSplittingRuleSegments.get(0).getName(), is("ms_group_0"));
         assertThat(readwriteSplittingRuleSegments.get(0).getWriteDataSource(), is("primary_ds"));
         assertThat(readwriteSplittingRuleSegments.get(0).getReadDataSources(), is(Arrays.asList("replica_ds_0", "replica_ds_1")));
@@ -346,9 +346,9 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_CREATE_DYNAMIC_READWRITE_SPLITTING_RULE);
         assertTrue(sqlStatement instanceof CreateReadwriteSplittingRuleStatement);
         CreateReadwriteSplittingRuleStatement statement = (CreateReadwriteSplittingRuleStatement) sqlStatement;
-        assertThat(statement.getReadwriteSplittingRules().size(), is(1));
+        assertThat(statement.getRules().size(), is(1));
         List<ReadwriteSplittingRuleSegment> readwriteSplittingRuleSegments
-                = new ArrayList<>(((CreateReadwriteSplittingRuleStatement) sqlStatement).getReadwriteSplittingRules());
+                = new ArrayList<>(((CreateReadwriteSplittingRuleStatement) sqlStatement).getRules());
         assertThat(readwriteSplittingRuleSegments.get(0).getName(), is("ms_group_1"));
         assertThat(readwriteSplittingRuleSegments.get(0).getAutoAwareResource(), is("group_0"));
         assertNull(readwriteSplittingRuleSegments.get(0).getWriteDataSource());
@@ -363,9 +363,9 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_ALTER_READWRITE_SPLITTING_RULE);
         assertTrue(sqlStatement instanceof AlterReadwriteSplittingRuleStatement);
         AlterReadwriteSplittingRuleStatement statement = (AlterReadwriteSplittingRuleStatement) sqlStatement;
-        assertThat(statement.getReadwriteSplittingRules().size(), is(2));
+        assertThat(statement.getRules().size(), is(2));
         List<ReadwriteSplittingRuleSegment> readwriteSplittingRuleSegments
-                = new ArrayList<>(((AlterReadwriteSplittingRuleStatement) sqlStatement).getReadwriteSplittingRules());
+                = new ArrayList<>(((AlterReadwriteSplittingRuleStatement) sqlStatement).getRules());
         assertThat(readwriteSplittingRuleSegments.get(0).getName(), is("ms_group_0"));
         assertThat(readwriteSplittingRuleSegments.get(0).getAutoAwareResource(), is("group_0"));
         assertNull(readwriteSplittingRuleSegments.get(0).getWriteDataSource());
@@ -392,9 +392,9 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_CREATE_DATABASE_DISCOVERY_RULE);
         assertTrue(sqlStatement instanceof CreateDatabaseDiscoveryRuleStatement);
         CreateDatabaseDiscoveryRuleStatement statement = (CreateDatabaseDiscoveryRuleStatement) sqlStatement;
-        assertThat(statement.getDatabaseDiscoveryRules().size(), is(2));
+        assertThat(statement.getRules().size(), is(2));
         List<DatabaseDiscoveryRuleSegment> databaseDiscoveryRuleSegments
-                = new ArrayList<>(((CreateDatabaseDiscoveryRuleStatement) sqlStatement).getDatabaseDiscoveryRules());
+                = new ArrayList<>(((CreateDatabaseDiscoveryRuleStatement) sqlStatement).getRules());
         assertThat(databaseDiscoveryRuleSegments.get(0).getName(), is("ha_group_0"));
         assertThat(databaseDiscoveryRuleSegments.get(0).getDiscoveryTypeName(), is("mgr"));
         assertThat(databaseDiscoveryRuleSegments.get(0).getDataSources(), is(Arrays.asList("resource0", "resource1")));
@@ -410,9 +410,9 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_ALTER_DATABASE_DISCOVERY_RULE);
         assertTrue(sqlStatement instanceof AlterDatabaseDiscoveryRuleStatement);
         AlterDatabaseDiscoveryRuleStatement statement = (AlterDatabaseDiscoveryRuleStatement) sqlStatement;
-        assertThat(statement.getDatabaseDiscoveryRules().size(), is(2));
+        assertThat(statement.getRules().size(), is(2));
         List<DatabaseDiscoveryRuleSegment> databaseDiscoveryRuleSegments
-                = new ArrayList<>(((AlterDatabaseDiscoveryRuleStatement) sqlStatement).getDatabaseDiscoveryRules());
+                = new ArrayList<>(((AlterDatabaseDiscoveryRuleStatement) sqlStatement).getRules());
         assertThat(databaseDiscoveryRuleSegments.get(0).getName(), is("ha_group_0"));
         assertThat(databaseDiscoveryRuleSegments.get(0).getDiscoveryTypeName(), is("mgr"));
         assertThat(databaseDiscoveryRuleSegments.get(0).getDataSources(), is(Arrays.asList("resource0", "resource1")));
@@ -435,8 +435,8 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_CREATE_ENCRYPT_RULE);
         assertTrue(sqlStatement instanceof CreateEncryptRuleStatement);
         CreateEncryptRuleStatement createEncryptRuleStatement = (CreateEncryptRuleStatement) sqlStatement;
-        assertThat(createEncryptRuleStatement.getEncryptRules().size(), is(1));
-        EncryptRuleSegment encryptRuleSegment = createEncryptRuleStatement.getEncryptRules().iterator().next();
+        assertThat(createEncryptRuleStatement.getRules().size(), is(1));
+        EncryptRuleSegment encryptRuleSegment = createEncryptRuleStatement.getRules().iterator().next();
         assertThat(encryptRuleSegment.getTableName(), is("t_encrypt"));
         assertThat(encryptRuleSegment.getColumns().size(), is(2));
         List<EncryptColumnSegment> encryptColumnSegments = new ArrayList<>(encryptRuleSegment.getColumns());
@@ -455,8 +455,8 @@ public final class DistSQLStatementParserEngineTest {
         SQLStatement sqlStatement = engine.parse(RDL_ALTER_ENCRYPT_RULE);
         assertTrue(sqlStatement instanceof AlterEncryptRuleStatement);
         AlterEncryptRuleStatement alterEncryptRuleStatement = (AlterEncryptRuleStatement) sqlStatement;
-        assertThat(alterEncryptRuleStatement.getEncryptRules().size(), is(1));
-        EncryptRuleSegment encryptRuleSegment = alterEncryptRuleStatement.getEncryptRules().iterator().next();
+        assertThat(alterEncryptRuleStatement.getRules().size(), is(1));
+        EncryptRuleSegment encryptRuleSegment = alterEncryptRuleStatement.getRules().iterator().next();
         assertThat(encryptRuleSegment.getTableName(), is("t_encrypt"));
         assertThat(encryptRuleSegment.getColumns().size(), is(2));
         List<EncryptColumnSegment> encryptColumnSegments = new ArrayList<>(encryptRuleSegment.getColumns());
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/AlterDatabaseDiscoveryRuleStatement.java
index 17074bb..bdabc15 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/AlterDatabaseDiscoveryRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class AlterDatabaseDiscoveryRuleStatement extends RDLStatement {
     
-    private final Collection<DatabaseDiscoveryRuleSegment> databaseDiscoveryRules;
+    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/AlterEncryptRuleStatement.java
index 33b87dd..7baa8fd 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/AlterEncryptRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class AlterEncryptRuleStatement extends RDLStatement {
     
-    private final Collection<EncryptRuleSegment> encryptRules;
+    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/AlterReadwriteSplittingRuleStatement.java
index c0f61d6..c6bf798 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/AlterReadwriteSplittingRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class AlterReadwriteSplittingRuleStatement extends RDLStatement {
     
-    private final Collection<ReadwriteSplittingRuleSegment> readwriteSplittingRules;
+    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/create/impl/CreateDatabaseDiscoveryRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateDatabaseDiscoveryRuleStatement.java
index 4e35267..77375bc 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateDatabaseDiscoveryRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateDatabaseDiscoveryRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class CreateDatabaseDiscoveryRuleStatement extends CreateRDLStatement {
     
-    private final Collection<DatabaseDiscoveryRuleSegment> databaseDiscoveryRules;
+    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/create/impl/CreateEncryptRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateEncryptRuleStatement.java
index 0337f7c..dabf6c8 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateEncryptRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateEncryptRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class CreateEncryptRuleStatement extends CreateRDLStatement {
     
-    private final Collection<EncryptRuleSegment> encryptRules;
+    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/create/impl/CreateReadwriteSplittingRuleStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateReadwriteSplittingRuleStatement.java
index 9034399..61b51f0 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateReadwriteSplittingRuleStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/create/impl/CreateReadwriteSplittingRuleStatement.java
@@ -31,5 +31,5 @@ import java.util.Collection;
 @Getter
 public final class CreateReadwriteSplittingRuleStatement extends CreateRDLStatement {
     
-    private final Collection<ReadwriteSplittingRuleSegment> readwriteSplittingRules;
+    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/drop/impl/DropShardingBindingTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBindingTableRulesStatement.java
index fbff731..957557e 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBindingTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBindingTableRulesStatement.java
@@ -17,12 +17,10 @@
 
 package org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl;
 
-import lombok.Getter;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRDLStatement;
 
 /**
  * Drop sharding binding table rules statement.
  */
-@Getter
 public final class DropShardingBindingTableRulesStatement extends DropRDLStatement {
 }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBroadcastTableRulesStatement.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBroadcastTableRulesStatement.java
index e53ef0f..229b1c6 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBroadcastTableRulesStatement.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/rdl/drop/impl/DropShardingBroadcastTableRulesStatement.java
@@ -17,12 +17,10 @@
 
 package org.apache.shardingsphere.distsql.parser.statement.rdl.drop.impl;
 
-import lombok.Getter;
 import org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRDLStatement;
 
 /**
  * Drop sharding broadcast table rules statement.
  */
-@Getter
 public final class DropShardingBroadcastTableRulesStatement extends DropRDLStatement {
 }
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
index 9a9eae0..85a019f 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-core/src/main/java/org/apache/shardingsphere/dbdiscovery/yaml/converter/DatabaseDiscoveryRuleStatementConverter.java
@@ -47,7 +47,7 @@ public final class DatabaseDiscoveryRuleStatementConverter {
         }
         return result;
     }
-
+    
     private static YamlDatabaseDiscoveryDataSourceRuleConfiguration buildDataSourceRuleConfiguration(final String databaseDiscoveryType,
                                                                                                      final DatabaseDiscoveryRuleSegment databaseDiscoveryRuleSegment) {
         YamlDatabaseDiscoveryDataSourceRuleConfiguration result = new YamlDatabaseDiscoveryDataSourceRuleConfiguration();
@@ -56,14 +56,14 @@ public final class DatabaseDiscoveryRuleStatementConverter {
         result.setProps(databaseDiscoveryRuleSegment.getProps());
         return result;
     }
-
+    
     private static YamlShardingSphereAlgorithmConfiguration buildDiscoveryType(final DatabaseDiscoveryRuleSegment databaseDiscoveryRuleSegment) {
         YamlShardingSphereAlgorithmConfiguration result = new YamlShardingSphereAlgorithmConfiguration();
         result.setType(databaseDiscoveryRuleSegment.getDiscoveryTypeName());
         result.setProps(databaseDiscoveryRuleSegment.getProps());
         return result;
     }
-
+    
     private static String getDatabaseDiscoveryType(final String ruleName, final String databaseDiscoveryType) {
         return String.format("%s_%s", ruleName, databaseDiscoveryType);
     }
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 99e72e8..296ecce 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
@@ -42,7 +42,7 @@ public final class ReadwriteSplittingRuleStatementConverter {
      * @return YAML readwrite splitting rule configuration
      */
     public static YamlReadwriteSplittingRuleConfiguration convert(final CreateReadwriteSplittingRuleStatement sqlStatement) {
-        return convert(sqlStatement.getReadwriteSplittingRules());
+        return convert(sqlStatement.getRules());
     }
 
     /**
@@ -52,7 +52,7 @@ public final class ReadwriteSplittingRuleStatementConverter {
      * @return YAML readwrite splitting rule configuration
      */
     public static YamlReadwriteSplittingRuleConfiguration convert(final AlterReadwriteSplittingRuleStatement sqlStatement) {
-        return convert(sqlStatement.getReadwriteSplittingRules());
+        return convert(sqlStatement.getRules());
     }
 
     private static YamlReadwriteSplittingRuleConfiguration convert(final Collection<ReadwriteSplittingRuleSegment> readwriteSplittingRuleSegments) {
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 8c963ae..8519ddf 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
@@ -66,7 +66,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandler extends RDLBackendHa
     public void doExecute(final String schemaName, final AlterDatabaseDiscoveryRuleStatement sqlStatement) {
         DatabaseDiscoveryRuleConfiguration databaseDiscoveryRuleConfiguration = getDatabaseDiscoveryRuleConfiguration(schemaName).get();
         DatabaseDiscoveryRuleConfiguration alteredDatabaseDiscoveryRuleConfiguration = new YamlRuleConfigurationSwapperEngine()
-                .swapToRuleConfigurations(Collections.singletonList(DatabaseDiscoveryRuleStatementConverter.convert(sqlStatement.getDatabaseDiscoveryRules()))).stream()
+                .swapToRuleConfigurations(Collections.singletonList(DatabaseDiscoveryRuleStatementConverter.convert(sqlStatement.getRules()))).stream()
                 .map(each -> (DatabaseDiscoveryRuleConfiguration) each).findFirst().get();
         drop(sqlStatement, databaseDiscoveryRuleConfiguration);
         databaseDiscoveryRuleConfiguration.getDataSources().addAll(alteredDatabaseDiscoveryRuleConfiguration.getDataSources());
@@ -102,7 +102,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandler extends RDLBackendHa
     
     private void checkResources(final String schemaName, final AlterDatabaseDiscoveryRuleStatement statement) {
         Collection<String> resources = new LinkedHashSet<>();
-        statement.getDatabaseDiscoveryRules().forEach(each -> resources.addAll(each.getDataSources()));
+        statement.getRules().forEach(each -> resources.addAll(each.getDataSources()));
         Collection<String> notExistResources = getInvalidResources(schemaName, resources);
         if (!notExistResources.isEmpty()) {
             throw new ResourceNotExistedException(schemaName, notExistResources);
@@ -110,7 +110,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandler extends RDLBackendHa
     }
     
     private void checkDiscoveryType(final AlterDatabaseDiscoveryRuleStatement statement) {
-        Collection<String> invalidDiscoveryTypes = statement.getDatabaseDiscoveryRules().stream().map(DatabaseDiscoveryRuleSegment::getDiscoveryTypeName).distinct()
+        Collection<String> invalidDiscoveryTypes = statement.getRules().stream().map(DatabaseDiscoveryRuleSegment::getDiscoveryTypeName).distinct()
                 .filter(each -> !TypedSPIRegistry.findRegisteredService(DatabaseDiscoveryType.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
         if (!invalidDiscoveryTypes.isEmpty()) {
@@ -119,7 +119,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandler extends RDLBackendHa
     }
     
     private Collection<String> getAlteredRuleNames(final AlterDatabaseDiscoveryRuleStatement sqlStatement) {
-        return sqlStatement.getDatabaseDiscoveryRules()
+        return sqlStatement.getRules()
                 .stream().map(DatabaseDiscoveryRuleSegment::getName).collect(Collectors.toList());
     }
 }
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 e86c7c4..03c1340 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
@@ -64,7 +64,7 @@ public final class AlterEncryptRuleBackendHandler extends RDLBackendHandler<Alte
     public void doExecute(final String schemaName, final AlterEncryptRuleStatement sqlStatement) {
         EncryptRuleConfiguration encryptRuleConfiguration = getEncryptRuleConfiguration(schemaName).get();
         EncryptRuleConfiguration alteredEncryptRuleConfiguration = new YamlRuleConfigurationSwapperEngine()
-                .swapToRuleConfigurations(Collections.singletonList(EncryptRuleStatementConverter.convert(sqlStatement.getEncryptRules()))).stream()
+                .swapToRuleConfigurations(Collections.singletonList(EncryptRuleStatementConverter.convert(sqlStatement.getRules()))).stream()
                 .map(each -> (EncryptRuleConfiguration) each).findFirst().get();
         drop(sqlStatement, encryptRuleConfiguration);
         encryptRuleConfiguration.getTables().addAll(alteredEncryptRuleConfiguration.getTables());
@@ -100,7 +100,7 @@ public final class AlterEncryptRuleBackendHandler extends RDLBackendHandler<Alte
     
     private void checkEncryptors(final AlterEncryptRuleStatement sqlStatement) {
         Collection<String> encryptors = new LinkedHashSet<>();
-        sqlStatement.getEncryptRules().forEach(each -> encryptors.addAll(each.getColumns().stream()
+        sqlStatement.getRules().forEach(each -> encryptors.addAll(each.getColumns().stream()
                 .map(column -> column.getEncryptor().getAlgorithmName()).collect(Collectors.toSet())));
         Collection<String> invalidEncryptors = encryptors.stream().filter(each -> !TypedSPIRegistry.findRegisteredService(EncryptAlgorithm.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
@@ -110,7 +110,7 @@ public final class AlterEncryptRuleBackendHandler extends RDLBackendHandler<Alte
     }
     
     private Collection<String> getAlteredRuleNames(final AlterEncryptRuleStatement sqlStatement) {
-        return sqlStatement.getEncryptRules()
+        return sqlStatement.getRules()
                 .stream().map(EncryptRuleSegment::getTableName).collect(Collectors.toList());
     }
 }
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 e9da468..8d590a6 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
@@ -101,7 +101,7 @@ public final class AlterReadwriteSplittingRuleBackendHandler extends RDLBackendH
     
     private void checkResources(final AlterReadwriteSplittingRuleStatement sqlStatement, final String schemaName) {
         Collection<String> resources = new LinkedHashSet<>();
-        sqlStatement.getReadwriteSplittingRules().stream().filter(each -> Strings.isNullOrEmpty(each.getAutoAwareResource())).forEach(each -> {
+        sqlStatement.getRules().stream().filter(each -> Strings.isNullOrEmpty(each.getAutoAwareResource())).forEach(each -> {
             resources.add(each.getWriteDataSource());
             resources.addAll(each.getReadDataSources());
         });
@@ -112,7 +112,7 @@ public final class AlterReadwriteSplittingRuleBackendHandler extends RDLBackendH
     }
     
     private void checkLoadBalancer(final AlterReadwriteSplittingRuleStatement sqlStatement) {
-        Collection<String> invalidLoadBalances = sqlStatement.getReadwriteSplittingRules().stream().map(ReadwriteSplittingRuleSegment::getLoadBalancer).distinct()
+        Collection<String> invalidLoadBalances = sqlStatement.getRules().stream().map(ReadwriteSplittingRuleSegment::getLoadBalancer).distinct()
                 .filter(each -> !TypedSPIRegistry.findRegisteredService(ReplicaLoadBalanceAlgorithm.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
         if (!invalidLoadBalances.isEmpty()) {
@@ -121,7 +121,7 @@ public final class AlterReadwriteSplittingRuleBackendHandler extends RDLBackendH
     }
     
     private Collection<String> getAlteredRuleNames(final AlterReadwriteSplittingRuleStatement sqlStatement) {
-        return sqlStatement.getReadwriteSplittingRules()
+        return sqlStatement.getRules()
                 .stream().map(ReadwriteSplittingRuleSegment::getName).collect(Collectors.toSet());
     }
 }
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java
index 7154bc8..b870fd0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseDiscoveryRuleBackendHandler.java
@@ -64,9 +64,9 @@ public final class CreateDatabaseDiscoveryRuleBackendHandler extends RDLBackendH
     
     @Override
     public void doExecute(final String schemaName, final CreateDatabaseDiscoveryRuleStatement sqlStatement) {
-        YamlDatabaseDiscoveryRuleConfiguration yamlDatabaseDiscoveryRuleConfiguration = DatabaseDiscoveryRuleStatementConverter.convert(sqlStatement.getDatabaseDiscoveryRules());
+        YamlDatabaseDiscoveryRuleConfiguration yamlDatabaseDiscoveryRuleConfig = DatabaseDiscoveryRuleStatementConverter.convert(sqlStatement.getRules());
         DatabaseDiscoveryRuleConfiguration createdDatabaseDiscoveryRuleConfiguration = new YamlRuleConfigurationSwapperEngine()
-                .swapToRuleConfigurations(Collections.singleton(yamlDatabaseDiscoveryRuleConfiguration))
+                .swapToRuleConfigurations(Collections.singleton(yamlDatabaseDiscoveryRuleConfig))
                 .stream().filter(each -> each instanceof DatabaseDiscoveryRuleConfiguration).findAny().map(each -> (DatabaseDiscoveryRuleConfiguration) each).get();
         if (getDatabaseDiscoveryRuleConfiguration(schemaName).isPresent()) {
             DatabaseDiscoveryRuleConfiguration existDatabaseDiscoveryRuleConfiguration = getDatabaseDiscoveryRuleConfiguration(schemaName).get();
@@ -81,7 +81,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandler extends RDLBackendH
         Optional<DatabaseDiscoveryRuleConfiguration> optional = getDatabaseDiscoveryRuleConfiguration(schemaName);
         if (optional.isPresent()) {
             Collection<String> existRuleNames = getRuleNames(optional.get());
-            Collection<String> duplicateRuleNames = sqlStatement.getDatabaseDiscoveryRules().stream()
+            Collection<String> duplicateRuleNames = sqlStatement.getRules().stream()
                     .map(DatabaseDiscoveryRuleSegment::getName).filter(existRuleNames::contains).collect(Collectors.toSet());
             duplicateRuleNames.addAll(getDuplicateRuleNames(sqlStatement));
             if (!duplicateRuleNames.isEmpty()) {
@@ -91,7 +91,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandler extends RDLBackendH
     }
     
     private Collection<String> getDuplicateRuleNames(final CreateDatabaseDiscoveryRuleStatement sqlStatement) {
-        return sqlStatement.getDatabaseDiscoveryRules().stream()
+        return sqlStatement.getRules().stream()
                 .collect(Collectors.toMap(DatabaseDiscoveryRuleSegment::getName, e -> 1, Integer::sum))
                 .entrySet().stream()
                 .filter(entry -> entry.getValue() > 1)
@@ -101,7 +101,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandler extends RDLBackendH
     
     private void checkResources(final String schemaName, final CreateDatabaseDiscoveryRuleStatement sqlStatement) {
         Collection<String> resources = new LinkedHashSet<>();
-        sqlStatement.getDatabaseDiscoveryRules().forEach(each -> resources.addAll(each.getDataSources()));
+        sqlStatement.getRules().forEach(each -> resources.addAll(each.getDataSources()));
         Collection<String> notExistResources = getInvalidResources(schemaName, resources);
         if (!notExistResources.isEmpty()) {
             throw new ResourceNotExistedException(schemaName, notExistResources);
@@ -109,7 +109,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandler extends RDLBackendH
     }
     
     private void checkDiscoverTypes(final CreateDatabaseDiscoveryRuleStatement sqlStatement) {
-        Collection<String> invalidDiscoveryTypes = sqlStatement.getDatabaseDiscoveryRules().stream().map(DatabaseDiscoveryRuleSegment::getDiscoveryTypeName).distinct()
+        Collection<String> invalidDiscoveryTypes = sqlStatement.getRules().stream().map(DatabaseDiscoveryRuleSegment::getDiscoveryTypeName).distinct()
                 .filter(each -> !TypedSPIRegistry.findRegisteredService(DatabaseDiscoveryType.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
         if (!invalidDiscoveryTypes.isEmpty()) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandler.java
index ebb878f..1c4c487 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateEncryptRuleBackendHandler.java
@@ -62,7 +62,7 @@ public final class CreateEncryptRuleBackendHandler extends RDLBackendHandler<Cre
     
     @Override
     public void doExecute(final String schemaName, final CreateEncryptRuleStatement sqlStatement) {
-        YamlEncryptRuleConfiguration yamlEncryptRuleConfiguration = EncryptRuleStatementConverter.convert(sqlStatement.getEncryptRules());
+        YamlEncryptRuleConfiguration yamlEncryptRuleConfiguration = EncryptRuleStatementConverter.convert(sqlStatement.getRules());
         EncryptRuleConfiguration createdEncryptRuleConfiguration = new YamlRuleConfigurationSwapperEngine()
                 .swapToRuleConfigurations(Collections.singleton(yamlEncryptRuleConfiguration))
                 .stream().filter(each -> each instanceof EncryptRuleConfiguration).findAny().map(each -> (EncryptRuleConfiguration) each).get();
@@ -79,7 +79,7 @@ public final class CreateEncryptRuleBackendHandler extends RDLBackendHandler<Cre
         Optional<EncryptRuleConfiguration> optional = getEncryptRuleConfiguration(schemaName);
         if (optional.isPresent()) {
             Collection<String> existRuleNames = getRuleNames(optional.get());
-            Collection<String> duplicateRuleNames = sqlStatement.getEncryptRules().stream()
+            Collection<String> duplicateRuleNames = sqlStatement.getRules().stream()
                     .map(EncryptRuleSegment::getTableName).filter(existRuleNames::contains).collect(Collectors.toList());
             if (!duplicateRuleNames.isEmpty()) {
                 throw new DuplicateRuleNamesException(schemaName, duplicateRuleNames);
@@ -89,7 +89,7 @@ public final class CreateEncryptRuleBackendHandler extends RDLBackendHandler<Cre
     
     private void checkEncryptors(final CreateEncryptRuleStatement sqlStatement) {
         Collection<String> encryptors = new LinkedHashSet<>();
-        sqlStatement.getEncryptRules().forEach(each -> encryptors.addAll(each.getColumns().stream()
+        sqlStatement.getRules().forEach(each -> encryptors.addAll(each.getColumns().stream()
                 .map(column -> column.getEncryptor().getAlgorithmName()).collect(Collectors.toSet())));
         Collection<String> invalidEncryptors = encryptors.stream().filter(
             each -> !TypedSPIRegistry.findRegisteredService(EncryptAlgorithm.class, each, new Properties()).isPresent()).collect(Collectors.toList());
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandler.java
index f24be2a..42fa951 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateReadwriteSplittingRuleBackendHandler.java
@@ -81,7 +81,7 @@ public final class CreateReadwriteSplittingRuleBackendHandler extends RDLBackend
         Optional<ReadwriteSplittingRuleConfiguration> optional = getReadwriteSplittingRuleConfiguration(schemaName);
         if (optional.isPresent()) {
             Collection<String> existRuleNames = getRuleNames(optional.get());
-            Collection<String> duplicateRuleNames = sqlStatement.getReadwriteSplittingRules()
+            Collection<String> duplicateRuleNames = sqlStatement.getRules()
                     .stream().map(ReadwriteSplittingRuleSegment::getName).filter(existRuleNames::contains).collect(Collectors.toList());
             if (!duplicateRuleNames.isEmpty()) {
                 throw new DuplicateRuleNamesException(schemaName, duplicateRuleNames);
@@ -97,7 +97,7 @@ public final class CreateReadwriteSplittingRuleBackendHandler extends RDLBackend
     }
     
     private void checkLoadBalancers(final CreateReadwriteSplittingRuleStatement sqlStatement) {
-        Collection<String> invalidLoadBalances = sqlStatement.getReadwriteSplittingRules().stream().map(ReadwriteSplittingRuleSegment::getLoadBalancer).distinct()
+        Collection<String> invalidLoadBalances = sqlStatement.getRules().stream().map(ReadwriteSplittingRuleSegment::getLoadBalancer).distinct()
                 .filter(each -> !TypedSPIRegistry.findRegisteredService(ReplicaLoadBalanceAlgorithm.class, each, new Properties()).isPresent())
                 .collect(Collectors.toList());
         if (!invalidLoadBalances.isEmpty()) {
@@ -107,7 +107,7 @@ public final class CreateReadwriteSplittingRuleBackendHandler extends RDLBackend
     
     private Collection<String> getResources(final CreateReadwriteSplittingRuleStatement sqlStatement) {
         Collection<String> result = new LinkedHashSet<>();
-        sqlStatement.getReadwriteSplittingRules().stream().filter(each -> Strings.isNullOrEmpty(each.getAutoAwareResource())).forEach(each -> {
+        sqlStatement.getRules().stream().filter(each -> Strings.isNullOrEmpty(each.getAutoAwareResource())).forEach(each -> {
             result.add(each.getWriteDataSource());
             result.addAll(each.getReadDataSources());
         });
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 6c1b888..82f04f7 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
@@ -99,7 +99,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("ha_group");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_0", "ds_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("TEST");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new DatabaseDiscoveryRuleConfiguration(new LinkedList<>(Collections
                         .singleton(databaseDiscoveryDataSourceRuleConfiguration)), Maps.newHashMap())));
@@ -125,7 +125,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("ha_group");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_0", "ds_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("TEST");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new DatabaseDiscoveryRuleConfiguration(Collections.emptyList(), Maps.newHashMap())));
         handler.execute("test", sqlStatement);
     }
@@ -136,7 +136,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("ha_group");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_0", "ds_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("TEST");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new DatabaseDiscoveryRuleConfiguration(Collections
                         .singleton(databaseDiscoveryDataSourceRuleConfiguration), Maps.newHashMap())));
@@ -150,7 +150,7 @@ public final class AlterDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("ha_group");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_0", "ds_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("notExistType");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new DatabaseDiscoveryRuleConfiguration(Collections
                         .singleton(databaseDiscoveryDataSourceRuleConfiguration), Maps.newHashMap())));
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 e2df244..9d8378e 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
@@ -89,7 +89,7 @@ public final class AlterEncryptRuleBackendHandlerTest {
     @Test
     public void assertExecute() {
         EncryptRuleSegment encryptRuleSegment = new EncryptRuleSegment("t_encrypt", buildColumns("MD5"));
-        when(sqlStatement.getEncryptRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new EncryptRuleConfiguration(new LinkedList<>(Collections
                         .singleton(encryptTableRuleConfiguration)), Maps.newHashMap())));
@@ -108,7 +108,7 @@ public final class AlterEncryptRuleBackendHandlerTest {
     @Test(expected = EncryptRulesNotExistedException.class)
     public void assertExecuteWithNoAlteredEncryptRules() {
         EncryptRuleSegment encryptRuleSegment = new EncryptRuleSegment("t_encrypt", buildColumns("MD5"));
-        when(sqlStatement.getEncryptRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new EncryptRuleConfiguration(Collections.emptyList(), Maps.newHashMap())));
         handler.execute("test", sqlStatement);
     }
@@ -116,7 +116,7 @@ public final class AlterEncryptRuleBackendHandlerTest {
     @Test(expected = InvalidEncryptorsException.class)
     public void assertExecuteWithInvalidEncryptors() {
         EncryptRuleSegment encryptRuleSegment = new EncryptRuleSegment("t_encrypt", buildColumns("notExistEncryptor"));
-        when(sqlStatement.getEncryptRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new EncryptRuleConfiguration(Collections
                         .singleton(encryptTableRuleConfiguration), Maps.newHashMap())));
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 9153f9c..0481966 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
@@ -100,7 +100,7 @@ public final class AlterReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("TEST");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new ReadwriteSplittingRuleConfiguration(new LinkedList<>(Collections
                         .singleton(readwriteSplittingDataSourceRuleConfiguration)), Maps.newHashMap())));
@@ -127,7 +127,7 @@ public final class AlterReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("TEST");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new ReadwriteSplittingRuleConfiguration(Collections.emptyList(), Maps.newHashMap())));
         handler.execute("test", sqlStatement);
     }
@@ -138,7 +138,7 @@ public final class AlterReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setName("pr_ds");
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new ReadwriteSplittingRuleConfiguration(Collections
                         .singleton(readwriteSplittingDataSourceRuleConfiguration), Maps.newHashMap())));
@@ -153,7 +153,7 @@ public final class AlterReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("notExistLoadBalancer");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(ruleMetaData.getConfigurations()).thenReturn(Collections
                 .singletonList(new ReadwriteSplittingRuleConfiguration(Collections
                         .singleton(readwriteSplittingDataSourceRuleConfiguration), Maps.newHashMap())));
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 a5f0db0..cc3af47 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
@@ -95,7 +95,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("pr_ds");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("TEST");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         when(shardingSphereMetaData.getResource()).thenReturn(shardingSphereResource);
         Map<String, DataSource> dataSourceMap = mock(Map.class);
         when(shardingSphereResource.getDataSources()).thenReturn(dataSourceMap);
@@ -115,7 +115,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("pr_ds");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("TEST");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         handler.execute("test", sqlStatement);
     }
     
@@ -124,7 +124,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandlerTest {
         DatabaseDiscoveryRuleSegment databaseDiscoveryRuleSegment = new DatabaseDiscoveryRuleSegment();
         databaseDiscoveryRuleSegment.setName("pr_ds");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
@@ -134,7 +134,7 @@ public final class CreateDatabaseDiscoveryRuleBackendHandlerTest {
         databaseDiscoveryRuleSegment.setName("pr_ds");
         databaseDiscoveryRuleSegment.setDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         databaseDiscoveryRuleSegment.setDiscoveryTypeName("notExistDiscoveryType");
-        when(sqlStatement.getDatabaseDiscoveryRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(databaseDiscoveryRuleSegment));
         when(shardingSphereMetaData.getResource()).thenReturn(shardingSphereResource);
         Map<String, DataSource> dataSourceMap = mock(Map.class);
         when(shardingSphereResource.getDataSources()).thenReturn(dataSourceMap);
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 3c890f4..ac6f7d7 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
@@ -85,7 +85,7 @@ public final class CreateEncryptRuleBackendHandlerTest {
     @Test
     public void assertExecute() {
         EncryptRuleSegment encryptRuleSegment = new EncryptRuleSegment("t_encrypt", buildColumns("MD5"));
-        when(sqlStatement.getEncryptRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
         ResponseHeader responseHeader = handler.execute("test", sqlStatement);
         assertNotNull(responseHeader);
         assertTrue(responseHeader instanceof UpdateResponseHeader);
@@ -97,14 +97,14 @@ public final class CreateEncryptRuleBackendHandlerTest {
         when(ruleMetaData.getConfigurations()).thenReturn(Collections.singletonList(new EncryptRuleConfiguration(Collections
                 .singleton(encryptTableRuleConfiguration), Maps.newHashMap())));
         EncryptRuleSegment encryptRuleSegment = new EncryptRuleSegment("t_encrypt", buildColumns("MD5"));
-        when(sqlStatement.getEncryptRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
     @Test(expected = InvalidEncryptorsException.class)
     public void assertExecuteWithInvalidEncryptors() {
         EncryptRuleSegment encryptRuleSegment = new EncryptRuleSegment("t_encrypt", buildColumns("notExistEncryptor"));
-        when(sqlStatement.getEncryptRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(encryptRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
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 cdcb70b..31300a3 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
@@ -99,7 +99,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("TEST");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(shardingSphereMetaData.getResource()).thenReturn(shardingSphereResource);
         Map<String, DataSource> dataSourceMap = mock(Map.class);
         when(shardingSphereResource.getDataSources()).thenReturn(dataSourceMap);
@@ -121,7 +121,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("TEST");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
@@ -138,7 +138,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("TEST");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(shardingSphereMetaData.getResource()).thenReturn(shardingSphereResource);
         Map<String, DataSource> dataSourceMap = mock(Map.class);
         when(shardingSphereResource.getDataSources()).thenReturn(dataSourceMap);
@@ -154,7 +154,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setName("pr_ds");
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         handler.execute("test", sqlStatement);
     }
 
@@ -165,7 +165,7 @@ public final class CreateReadwriteSplittingRuleBackendHandlerTest {
         readwriteSplittingRuleSegment.setWriteDataSource("ds_write");
         readwriteSplittingRuleSegment.setReadDataSources(Arrays.asList("ds_read_0", "ds_read_1"));
         readwriteSplittingRuleSegment.setLoadBalancer("notExistLoadBalancer");
-        when(sqlStatement.getReadwriteSplittingRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
+        when(sqlStatement.getRules()).thenReturn(Collections.singletonList(readwriteSplittingRuleSegment));
         when(shardingSphereMetaData.getResource()).thenReturn(shardingSphereResource);
         Map<String, DataSource> dataSourceMap = mock(Map.class);
         when(shardingSphereResource.getDataSources()).thenReturn(dataSourceMap);

Mime
View raw message