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

[shardingsphere] branch master updated: ## Fix [Issue10604](https://github.com/apache/shardingsphere/issues/10604) (#10613)

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

zhangliang 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 91534e5  ## Fix [Issue10604](https://github.com/apache/shardingsphere/issues/10604) (#10613)
91534e5 is described below

commit 91534e545f7c62f23b9e84ba797530a721beb8d5
Author: Abhishek Karkamkar <41...@users.noreply.github.com>
AuthorDate: Tue Jun 1 20:58:18 2021 +0530

    ## Fix [Issue10604](https://github.com/apache/shardingsphere/issues/10604) (#10613)
    
    changes related to replacement of keyword calcite to federate.
---
 .../jdbc/base/AbstractSQLFederationTest.java       | 12 +++---
 ...actShardingSphereDataSourceForFederateTest.java | 20 ++++-----
 .../statement/FederatePrepareStatementTest.java    | 46 ++++++++++----------
 .../jdbc/core/statement/FederateStatementTest.java | 50 +++++++++++-----------
 .../{config-calcite.yaml => config-federate.yaml}  | 28 ++++++------
 .../src/test/resources/sql/calcite_data_1.sql      | 47 --------------------
 .../src/test/resources/sql/calcite_data_2.sql      | 47 --------------------
 .../{calcite_data_0.sql => federate_data_0.sql}    | 18 ++++----
 .../src/test/resources/sql/federate_data_1.sql     | 47 ++++++++++++++++++++
 .../src/test/resources/sql/federate_data_2.sql     | 47 ++++++++++++++++++++
 .../src/test/resources/sql/jdbc_init_calcite_1.sql | 23 ----------
 ...init_calcite_0.sql => jdbc_init_federate_0.sql} |  6 +--
 .../test/resources/sql/jdbc_init_federate_1.sql    | 23 ++++++++++
 13 files changed, 207 insertions(+), 207 deletions(-)

diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLFederationTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLFederationTest.java
index 7d40e56..985c323 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLFederationTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLFederationTest.java
@@ -32,17 +32,17 @@ public abstract class AbstractSQLFederationTest {
     
     private static final Map<String, DataSource> ACTUAL_DATA_SOURCES = new HashMap<>();
     
-    private static final String INIT_CALCITE_DATABASE_0 = "sql/jdbc_init_calcite_0.sql";
+    private static final String INIT_FEDERATE_DATABASE_0 = "sql/jdbc_init_federate_0.sql";
     
-    private static final String INIT_CALCITE_DATABASE_1 = "sql/jdbc_init_calcite_1.sql";
+    private static final String INIT_FEDERATE_DATABASE_1 = "sql/jdbc_init_federate_1.sql";
 
-    private static final String INIT_CALCITE_DATABASE_2 = "sql/jdbc_init_calcite_1.sql";
+    private static final String INIT_FEDERATE_DATABASE_2 = "sql/jdbc_init_federate_1.sql";
 
     @BeforeClass
     public static synchronized void initializeDataSource() throws SQLException {
-        createDataSources("calcite_jdbc_0", INIT_CALCITE_DATABASE_0);
-        createDataSources("calcite_jdbc_1", INIT_CALCITE_DATABASE_1);
-        createDataSources("calcite_jdbc_2", INIT_CALCITE_DATABASE_2);
+        createDataSources("federate_jdbc_0", INIT_FEDERATE_DATABASE_0);
+        createDataSources("federate_jdbc_1", INIT_FEDERATE_DATABASE_1);
+        createDataSources("federate_jdbc_2", INIT_FEDERATE_DATABASE_2);
     }
     
     private static void createDataSources(final String dataSourceName, final String initSql) throws SQLException {
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForFederateTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForFederateTest.java
index 4d9243a..1e3d919 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForFederateTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForFederateTest.java
@@ -42,16 +42,16 @@ public abstract class AbstractShardingSphereDataSourceForFederateTest extends Ab
     
     private static ShardingSphereDataSource dataSource;
     
-    private static final List<String> ACTUAL_DATA_SOURCE_NAMES = Arrays.asList("calcite_jdbc_0", "calcite_jdbc_1", "calcite_jdbc_2");
+    private static final List<String> ACTUAL_DATA_SOURCE_NAMES = Arrays.asList("federate_jdbc_0", "federate_jdbc_1", "federate_jdbc_2");
     
-    private static final String CONFIG_CALCITE = "config/config-calcite.yaml";
+    private static final String CONFIG_FEDERATE = "config/config-federate.yaml";
     
     @BeforeClass
-    public static void initCalciteDataSource() throws IOException, SQLException {
+    public static void initFederateDataSource() throws IOException, SQLException {
         if (null != dataSource) {
             return;
         }
-        dataSource = (ShardingSphereDataSource) YamlShardingSphereDataSourceFactory.createDataSource(getDataSourceMap(), getFile(CONFIG_CALCITE));
+        dataSource = (ShardingSphereDataSource) YamlShardingSphereDataSourceFactory.createDataSource(getDataSourceMap(), getFile(CONFIG_FEDERATE));
     }
     
     private static Map<String, DataSource> getDataSourceMap() {
@@ -63,12 +63,12 @@ public abstract class AbstractShardingSphereDataSourceForFederateTest extends Ab
         try {
             ShardingSphereConnection conn = dataSource.getConnection();
             Map<String, DataSource> dataSourceMap = conn.getDataSourceMap();
-            Connection database0 = dataSourceMap.get("calcite_jdbc_0").getConnection();
-            Connection database1 = dataSourceMap.get("calcite_jdbc_1").getConnection();
-            Connection database2 = dataSourceMap.get("calcite_jdbc_2").getConnection();
-            RunScript.execute(database0, new InputStreamReader(Objects.requireNonNull(AbstractSQLTest.class.getClassLoader().getResourceAsStream("sql/calcite_data_0.sql"))));
-            RunScript.execute(database1, new InputStreamReader(Objects.requireNonNull(AbstractSQLTest.class.getClassLoader().getResourceAsStream("sql/calcite_data_1.sql"))));
-            RunScript.execute(database2, new InputStreamReader(Objects.requireNonNull(AbstractSQLTest.class.getClassLoader().getResourceAsStream("sql/calcite_data_2.sql"))));
+            Connection database0 = dataSourceMap.get("federate_jdbc_0").getConnection();
+            Connection database1 = dataSourceMap.get("federate_jdbc_1").getConnection();
+            Connection database2 = dataSourceMap.get("federate_jdbc_2").getConnection();
+            RunScript.execute(database0, new InputStreamReader(Objects.requireNonNull(AbstractSQLTest.class.getClassLoader().getResourceAsStream("sql/federate_data_0.sql"))));
+            RunScript.execute(database1, new InputStreamReader(Objects.requireNonNull(AbstractSQLTest.class.getClassLoader().getResourceAsStream("sql/federate_data_1.sql"))));
+            RunScript.execute(database2, new InputStreamReader(Objects.requireNonNull(AbstractSQLTest.class.getClassLoader().getResourceAsStream("sql/federate_data_2.sql"))));
             conn.close();
         } catch (final SQLException ex) {
             throw new RuntimeException(ex);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederatePrepareStatementTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederatePrepareStatementTest.java
index b9e1b65..b1f2924 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederatePrepareStatementTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederatePrepareStatementTest.java
@@ -32,39 +32,39 @@ import static org.junit.Assert.assertTrue;
 public final class FederatePrepareStatementTest extends AbstractShardingSphereDataSourceForFederateTest {
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES =
-            "select o.*, i.* from t_order_calcite o, t_order_item_calcite i where o.order_id = ? and i.item_id = ?";
+            "select o.*, i.* from t_order_federate o, t_order_item_federate i where o.order_id = ? and i.item_id = ?";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES =
-            "select t_order_calcite.*, t_order_item_calcite_sharding.* "
-                    + "from t_order_calcite, t_order_item_calcite_sharding "
-                    + "where t_order_calcite.order_id = t_order_item_calcite_sharding.item_id "
-                    + "AND t_order_item_calcite_sharding.order_id = ?";
+            "select t_order_federate.*, t_order_item_federate_sharding.* "
+                    + "from t_order_federate, t_order_item_federate_sharding "
+                    + "where t_order_federate.order_id = t_order_item_federate_sharding.item_id "
+                    + "AND t_order_item_federate_sharding.order_id = ?";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_ALIAS =
-            "select o.*, i.* from t_order_calcite o, t_order_item_calcite_sharding i "
+            "select o.*, i.* from t_order_federate o, t_order_item_federate_sharding i "
                     + "where o.order_id = i.item_id AND i.order_id = ?";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_REWRITE =
-            "select t_order_calcite.*, t_order_item_calcite_sharding.* "
-                    + "from t_order_calcite, t_order_item_calcite_sharding "
-                    + "where t_order_calcite.order_id = t_order_item_calcite_sharding.item_id "
-                    + "AND t_order_item_calcite_sharding.remarks = 't_order_item_calcite_sharding' "
-                    + "AND t_order_item_calcite_sharding.user_id = ?";
+            "select t_order_federate.*, t_order_item_federate_sharding.* "
+                    + "from t_order_federate, t_order_item_federate_sharding "
+                    + "where t_order_federate.order_id = t_order_item_federate_sharding.item_id "
+                    + "AND t_order_item_federate_sharding.remarks = 't_order_item_federate_sharding' "
+                    + "AND t_order_item_federate_sharding.user_id = ?";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES_WITH_ENCRYPT =
-            "select t_user_encrypt_calcite.user_id, t_user_encrypt_calcite.pwd, t_user_info.information from t_user_encrypt_calcite, t_user_info "
-                    + "where t_user_encrypt_calcite.user_id = t_user_info.user_id and t_user_encrypt_calcite.user_id > ? ";
+            "select t_user_encrypt_federate.user_id, t_user_encrypt_federate.pwd, t_user_info.information from t_user_encrypt_federate, t_user_info "
+                    + "where t_user_encrypt_federate.user_id = t_user_info.user_id and t_user_encrypt_federate.user_id > ? ";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_WITH_ENCRYPT =
-            "select t_user_encrypt_calcite_sharding.user_id, t_user_encrypt_calcite_sharding.pwd, t_user_info.information from t_user_encrypt_calcite_sharding, t_user_info "
-            + "where t_user_encrypt_calcite_sharding.user_id = t_user_info.user_id and t_user_encrypt_calcite_sharding.user_id > ? ";
+            "select t_user_encrypt_federate_sharding.user_id, t_user_encrypt_federate_sharding.pwd, t_user_info.information from t_user_encrypt_federate_sharding, t_user_info "
+            + "where t_user_encrypt_federate_sharding.user_id = t_user_info.user_id and t_user_encrypt_federate_sharding.user_id > ? ";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_TWO_SHARDING_TABLES =
-            "select o.order_id_sharding, i.order_id from t_order_calcite_sharding o, t_order_item_calcite_sharding i "
+            "select o.order_id_sharding, i.order_id from t_order_federate_sharding o, t_order_item_federate_sharding i "
                     + "where o.order_id_sharding = i.item_id and i.order_id > ?";
 
     @Test
-    public void assertQueryWithCalciteInSingleTables() throws SQLException {
+    public void assertQueryWithFederateInSingleTables() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource().getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES);
         preparedStatement.setInt(1, 1000);
         preparedStatement.setInt(2, 100000);
@@ -82,7 +82,7 @@ public final class FederatePrepareStatementTest extends AbstractShardingSphereDa
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTable() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTable() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource()
                 .getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES);
         preparedStatement.setInt(1, 10001);
@@ -98,7 +98,7 @@ public final class FederatePrepareStatementTest extends AbstractShardingSphereDa
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTableWithAlias() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTableWithAlias() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource()
                 .getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_ALIAS);
         preparedStatement.setInt(1, 10001);
@@ -114,7 +114,7 @@ public final class FederatePrepareStatementTest extends AbstractShardingSphereDa
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTableRewrite() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTableRewrite() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource()
                 .getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_REWRITE);
         preparedStatement.setInt(1, 11);
@@ -140,7 +140,7 @@ public final class FederatePrepareStatementTest extends AbstractShardingSphereDa
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleTablesWithEncryptRule() throws SQLException {
+    public void assertQueryWithFederateInSingleTablesWithEncryptRule() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource()
                 .getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES_WITH_ENCRYPT);
         preparedStatement.setInt(1, 1);
@@ -158,7 +158,7 @@ public final class FederatePrepareStatementTest extends AbstractShardingSphereDa
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTablesWithEncryptRule() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTablesWithEncryptRule() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource()
                 .getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_WITH_ENCRYPT);
         preparedStatement.setInt(1, 1);
@@ -176,7 +176,7 @@ public final class FederatePrepareStatementTest extends AbstractShardingSphereDa
     }
 
     @Test
-    public void assertQueryWithCalciteBetweenTwoShardingTables() throws SQLException {
+    public void assertQueryWithFederateBetweenTwoShardingTables() throws SQLException {
         ShardingSpherePreparedStatement preparedStatement = (ShardingSpherePreparedStatement) getShardingSphereDataSource()
                 .getConnection().prepareStatement(SELECT_SQL_BY_ID_ACROSS_TWO_SHARDING_TABLES);
         preparedStatement.setInt(1, 10000);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederateStatementTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederateStatementTest.java
index 781deae..57f25c9 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederateStatementTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/FederateStatementTest.java
@@ -32,42 +32,42 @@ import static org.junit.Assert.assertTrue;
 public final class FederateStatementTest extends AbstractShardingSphereDataSourceForFederateTest {
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES =
-            "select o.*, i.* from t_order_calcite o, t_order_item_calcite i "
+            "select o.*, i.* from t_order_federate o, t_order_item_federate i "
             + "where o.order_id = 1000 and i.item_id = 100000";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES =
-            "select t_order_calcite.*, t_order_item_calcite_sharding.* from t_order_calcite, "
-                    + "t_order_item_calcite_sharding where t_order_calcite.order_id = "
-                    + "t_order_item_calcite_sharding.item_id";
+            "select t_order_federate.*, t_order_item_federate_sharding.* from t_order_federate, "
+                    + "t_order_item_federate_sharding where t_order_federate.order_id = "
+                    + "t_order_item_federate_sharding.item_id";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_ALIAS = "select o.*, i.* from"
-            + " t_order_calcite o, t_order_item_calcite_sharding i where o.order_id = i.item_id";
+            + " t_order_federate o, t_order_item_federate_sharding i where o.order_id = i.item_id";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_REWRITE =
-            "select t_order_calcite.*, t_order_item_calcite_sharding.* from "
-                    + "t_order_calcite, t_order_item_calcite_sharding "
-                    + "where t_order_calcite.order_id = t_order_item_calcite_sharding.item_id "
-                    + "AND t_order_item_calcite_sharding.remarks = 't_order_item_calcite_sharding'";
+            "select t_order_federate.*, t_order_item_federate_sharding.* from "
+                    + "t_order_federate, t_order_item_federate_sharding "
+                    + "where t_order_federate.order_id = t_order_item_federate_sharding.item_id "
+                    + "AND t_order_item_federate_sharding.remarks = 't_order_item_federate_sharding'";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_ORDER_BY =
-            "select t_order_calcite.* from t_order_calcite, t_order_item_calcite_sharding "
-                    + "where t_order_calcite.order_id = t_order_item_calcite_sharding.item_id "
-                    + "ORDER BY t_order_item_calcite_sharding.user_id";
+            "select t_order_federate.* from t_order_federate, t_order_item_federate_sharding "
+                    + "where t_order_federate.order_id = t_order_item_federate_sharding.item_id "
+                    + "ORDER BY t_order_item_federate_sharding.user_id";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES_WITH_ENCRYPT =
-            "select t_user_encrypt_calcite.user_id, t_user_encrypt_calcite.pwd, t_user_info.information from t_user_encrypt_calcite, t_user_info "
-            + "where t_user_encrypt_calcite.user_id = t_user_info.user_id ";
+            "select t_user_encrypt_federate.user_id, t_user_encrypt_federate.pwd, t_user_info.information from t_user_encrypt_federate, t_user_info "
+            + "where t_user_encrypt_federate.user_id = t_user_info.user_id ";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_WITH_ENCRYPT =
-            "select t_user_encrypt_calcite_sharding.user_id, t_user_encrypt_calcite_sharding.pwd, t_user_info.information from t_user_encrypt_calcite_sharding, t_user_info "
-                    + "where t_user_encrypt_calcite_sharding.user_id = t_user_info.user_id ";
+            "select t_user_encrypt_federate_sharding.user_id, t_user_encrypt_federate_sharding.pwd, t_user_info.information from t_user_encrypt_federate_sharding, t_user_info "
+                    + "where t_user_encrypt_federate_sharding.user_id = t_user_info.user_id ";
 
     private static final String SELECT_SQL_BY_ID_ACROSS_TWO_SHARDING_TABLES =
-            "select o.order_id_sharding, i.order_id from t_order_calcite_sharding o, t_order_item_calcite_sharding i "
+            "select o.order_id_sharding, i.order_id from t_order_federate_sharding o, t_order_item_federate_sharding i "
                     + "where o.order_id_sharding = i.item_id";
 
     @Test
-    public void assertQueryWithCalciteInSingleTables() throws SQLException {
+    public void assertQueryWithFederateInSingleTables() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES);
         assertNotNull(resultSet);
@@ -83,7 +83,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTable() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTable() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES);
         assertNotNull(resultSet);
@@ -103,7 +103,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTableWithAlias() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTableWithAlias() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_ALIAS);
         assertNotNull(resultSet);
@@ -123,7 +123,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTableRewrite() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTableRewrite() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_REWRITE);
         assertNotNull(resultSet);
@@ -143,7 +143,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTableOrderBy() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTableOrderBy() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_ORDER_BY);
         assertNotNull(resultSet);
@@ -159,7 +159,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleTablesWithEncryptRule() throws SQLException {
+    public void assertQueryWithFederateInSingleTablesWithEncryptRule() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_TABLES_WITH_ENCRYPT);
         assertNotNull(resultSet);
@@ -183,7 +183,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteInSingleAndShardingTablesWithEncryptRule() throws SQLException {
+    public void assertQueryWithFederateInSingleAndShardingTablesWithEncryptRule() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_SINGLE_AND_SHARDING_TABLES_WITH_ENCRYPT);
         assertNotNull(resultSet);
@@ -207,7 +207,7 @@ public final class FederateStatementTest extends AbstractShardingSphereDataSourc
     }
 
     @Test
-    public void assertQueryWithCalciteBetweenTwoShardingTables() throws SQLException {
+    public void assertQueryWithFederateBetweenTwoShardingTables() throws SQLException {
         ShardingSphereStatement preparedStatement = (ShardingSphereStatement) getShardingSphereDataSource().getConnection().createStatement();
         ResultSet resultSet = preparedStatement.executeQuery(SELECT_SQL_BY_ID_ACROSS_TWO_SHARDING_TABLES);
         assertNotNull(resultSet);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-federate.yaml
similarity index 74%
rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml
rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-federate.yaml
index 62e08f1..c81a93b 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-calcite.yaml
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/config/config-federate.yaml
@@ -18,20 +18,20 @@
 rules:
   - !SHARDING
     tables:
-      t_order_item_calcite_sharding:
-        actualDataNodes: calcite_ds.t_order_item_calcite_sharding_${0..1}
+      t_order_item_federate_sharding:
+        actualDataNodes: federate_ds.t_order_item_federate_sharding_${0..1}
         tableStrategy:
           standard:
             shardingColumn: item_id
             shardingAlgorithmName: table_inline_item_id
-      t_user_encrypt_calcite_sharding:
-        actualDataNodes: calcite_ds.t_user_encrypt_calcite_sharding_${0..1}
+      t_user_encrypt_federate_sharding:
+        actualDataNodes: federate_ds.t_user_encrypt_federate_sharding_${0..1}
         tableStrategy:
           standard:
             shardingColumn: user_id
             shardingAlgorithmName: table_inline_user_id
-      t_order_calcite_sharding:
-        actualDataNodes: calcite_jdbc_0.t_order_calcite_sharding_${0..1}
+      t_order_federate_sharding:
+        actualDataNodes: federate_jdbc_0.t_order_federate_sharding_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id_sharding
@@ -40,15 +40,15 @@ rules:
       table_inline_item_id:
         type: INLINE
         props:
-          algorithm-expression: t_order_item_calcite_sharding_${item_id % 2}
+          algorithm-expression: t_order_item_federate_sharding_${item_id % 2}
       table_inline_user_id:
         type: INLINE
         props:
-          algorithm-expression: t_user_encrypt_calcite_sharding_${user_id % 2}
+          algorithm-expression: t_user_encrypt_federate_sharding_${user_id % 2}
       table_inline_order_id:
         type: INLINE
         props:
-          algorithm-expression: t_order_calcite_sharding_${order_id_sharding % 2}
+          algorithm-expression: t_order_federate_sharding_${order_id_sharding % 2}
   - !ENCRYPT
     encryptors:
       encryptor_aes:
@@ -58,13 +58,13 @@ rules:
       test:
         type: test
     tables:
-      t_user_encrypt_calcite:
+      t_user_encrypt_federate:
         columns:
           pwd:
             plainColumn: plain_pwd
             cipherColumn: cipher_pwd
             encryptorName: test
-      t_user_encrypt_calcite_sharding:
+      t_user_encrypt_federate_sharding:
         columns:
           pwd:
             plainColumn: plain_pwd
@@ -72,11 +72,11 @@ rules:
             encryptorName: test
   - !READWRITE_SPLITTING
     dataSources:
-      calcite_ds:
+      federate_ds:
         writeDataSourceName:
-          - calcite_jdbc_1
+          - federate_jdbc_1
         readDataSourceNames:
-          - calcite_jdbc_2
+          - federate_jdbc_2
         loadBalancerName: roundRobin
     loadBalancers:
       roundRobin:
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_1.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_1.sql
deleted file mode 100644
index 39c6865..0000000
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_1.sql
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-DELETE FROM t_order_item_calcite;
-DELETE FROM t_order_item_calcite_sharding_0;
-DELETE FROM t_order_item_calcite_sharding_1;
-DELETE FROM t_user_encrypt_calcite;
-DELETE FROM t_user_encrypt_calcite_sharding_0;
-DELETE FROM t_user_encrypt_calcite_sharding_1;
-
-INSERT INTO t_order_item_calcite VALUES(100000, 1000, 10, 'init');
-INSERT INTO t_order_item_calcite VALUES(100001, 1000, 10, 'init');
-INSERT INTO t_order_item_calcite VALUES(100100, 1001, 10, 'init');
-INSERT INTO t_order_item_calcite VALUES(100101, 1001, 10, 'init');
-
-INSERT INTO t_order_item_calcite_sharding_0 VALUES(1000, 10000, 10, 'init', 't_order_item_calcite_sharding');
-INSERT INTO t_order_item_calcite_sharding_1 VALUES(1001, 10001, 11, 'init', 't_order_item_calcite_sharding');
-INSERT INTO t_order_item_calcite_sharding_0 VALUES(1010, 10001, 10, 'init', 't_order_item_calcite_sharding');
-INSERT INTO t_order_item_calcite_sharding_1 VALUES(1011, 10001, 10, 'init', 't_order_item_calcite_sharding');
-
-INSERT INTO t_user_encrypt_calcite VALUES(0, 'plain password1', 'U2FsdGVkX19XstrYErommVKzbiaDrBzs5hkJnfw2iqY=', 'Rachel');
-INSERT INTO t_user_encrypt_calcite VALUES(1, 'plain password2', 'U2FsdGVkX1+qxFaxftJmfwfUT8Q8e8QnNesNZjP9jLo=', 'Monica');
-INSERT INTO t_user_encrypt_calcite VALUES(2, 'plain password3', 'U2FsdGVkX19d4VBBrjaSC7QX9tsdNFcpMNaZaxmJyYs=', 'Phoebe');
-INSERT INTO t_user_encrypt_calcite VALUES(3, 'plain password4', 'U2FsdGVkX18viyM9JBybwvkks0qCmP56vojYnniqZOo=', 'Ross');
-INSERT INTO t_user_encrypt_calcite VALUES(4, 'plain password5', 'U2FsdGVkX1+Lbc0iRrg/vk5BDQ+hHqbFEN7TFXztjro=', 'Chandler');
-INSERT INTO t_user_encrypt_calcite VALUES(5, 'plain password6', 'U2FsdGVkX1/liIWOUCQ2W6sUgkGDSKZ/3QEiMTZtIsg=', 'Joey');
-
-INSERT INTO t_user_encrypt_calcite_sharding_0 VALUES(0, 'plain passwordA', 'U2FsdGVkX1/TAZ4ul/UUIbvMJvbZ4SLibJzd7pwmDOM=', 'Rachel');
-INSERT INTO t_user_encrypt_calcite_sharding_1 VALUES(1, 'plain passwordB', 'U2FsdGVkX1/EWOAnnTvPQIsdleGxw01nnnEa2VUk8vo=', 'Monica');
-INSERT INTO t_user_encrypt_calcite_sharding_0 VALUES(2, 'plain passwordC', 'U2FsdGVkX19nXmysCFFcVtUFriy5ev7s0RsNT1XNJKg=', 'Phoebe');
-INSERT INTO t_user_encrypt_calcite_sharding_1 VALUES(3, 'plain passwordD', 'U2FsdGVkX19KwrlD1BIcVtxGOSXGguAUCb2SydUhqRc=', 'Ross');
-INSERT INTO t_user_encrypt_calcite_sharding_0 VALUES(4, 'plain passwordE', 'U2FsdGVkX1+70hUvvGH16ddUxpK1s5sJXQLQRNbcNeE=', 'Chandler');
-INSERT INTO t_user_encrypt_calcite_sharding_1 VALUES(5, 'plain passwordF', 'U2FsdGVkX191hCfwkImzIRP1DIAK2M9FLgQSFHa1zlE=', 'Joey');
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_2.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_2.sql
deleted file mode 100644
index 39c6865..0000000
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_2.sql
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-DELETE FROM t_order_item_calcite;
-DELETE FROM t_order_item_calcite_sharding_0;
-DELETE FROM t_order_item_calcite_sharding_1;
-DELETE FROM t_user_encrypt_calcite;
-DELETE FROM t_user_encrypt_calcite_sharding_0;
-DELETE FROM t_user_encrypt_calcite_sharding_1;
-
-INSERT INTO t_order_item_calcite VALUES(100000, 1000, 10, 'init');
-INSERT INTO t_order_item_calcite VALUES(100001, 1000, 10, 'init');
-INSERT INTO t_order_item_calcite VALUES(100100, 1001, 10, 'init');
-INSERT INTO t_order_item_calcite VALUES(100101, 1001, 10, 'init');
-
-INSERT INTO t_order_item_calcite_sharding_0 VALUES(1000, 10000, 10, 'init', 't_order_item_calcite_sharding');
-INSERT INTO t_order_item_calcite_sharding_1 VALUES(1001, 10001, 11, 'init', 't_order_item_calcite_sharding');
-INSERT INTO t_order_item_calcite_sharding_0 VALUES(1010, 10001, 10, 'init', 't_order_item_calcite_sharding');
-INSERT INTO t_order_item_calcite_sharding_1 VALUES(1011, 10001, 10, 'init', 't_order_item_calcite_sharding');
-
-INSERT INTO t_user_encrypt_calcite VALUES(0, 'plain password1', 'U2FsdGVkX19XstrYErommVKzbiaDrBzs5hkJnfw2iqY=', 'Rachel');
-INSERT INTO t_user_encrypt_calcite VALUES(1, 'plain password2', 'U2FsdGVkX1+qxFaxftJmfwfUT8Q8e8QnNesNZjP9jLo=', 'Monica');
-INSERT INTO t_user_encrypt_calcite VALUES(2, 'plain password3', 'U2FsdGVkX19d4VBBrjaSC7QX9tsdNFcpMNaZaxmJyYs=', 'Phoebe');
-INSERT INTO t_user_encrypt_calcite VALUES(3, 'plain password4', 'U2FsdGVkX18viyM9JBybwvkks0qCmP56vojYnniqZOo=', 'Ross');
-INSERT INTO t_user_encrypt_calcite VALUES(4, 'plain password5', 'U2FsdGVkX1+Lbc0iRrg/vk5BDQ+hHqbFEN7TFXztjro=', 'Chandler');
-INSERT INTO t_user_encrypt_calcite VALUES(5, 'plain password6', 'U2FsdGVkX1/liIWOUCQ2W6sUgkGDSKZ/3QEiMTZtIsg=', 'Joey');
-
-INSERT INTO t_user_encrypt_calcite_sharding_0 VALUES(0, 'plain passwordA', 'U2FsdGVkX1/TAZ4ul/UUIbvMJvbZ4SLibJzd7pwmDOM=', 'Rachel');
-INSERT INTO t_user_encrypt_calcite_sharding_1 VALUES(1, 'plain passwordB', 'U2FsdGVkX1/EWOAnnTvPQIsdleGxw01nnnEa2VUk8vo=', 'Monica');
-INSERT INTO t_user_encrypt_calcite_sharding_0 VALUES(2, 'plain passwordC', 'U2FsdGVkX19nXmysCFFcVtUFriy5ev7s0RsNT1XNJKg=', 'Phoebe');
-INSERT INTO t_user_encrypt_calcite_sharding_1 VALUES(3, 'plain passwordD', 'U2FsdGVkX19KwrlD1BIcVtxGOSXGguAUCb2SydUhqRc=', 'Ross');
-INSERT INTO t_user_encrypt_calcite_sharding_0 VALUES(4, 'plain passwordE', 'U2FsdGVkX1+70hUvvGH16ddUxpK1s5sJXQLQRNbcNeE=', 'Chandler');
-INSERT INTO t_user_encrypt_calcite_sharding_1 VALUES(5, 'plain passwordF', 'U2FsdGVkX191hCfwkImzIRP1DIAK2M9FLgQSFHa1zlE=', 'Joey');
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_0.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_0.sql
similarity index 68%
rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_0.sql
rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_0.sql
index 8fdc83c..778bc9c 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/calcite_data_0.sql
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_0.sql
@@ -15,18 +15,18 @@
  * limitations under the License.
  */
 
-DELETE FROM t_order_calcite;
+DELETE FROM t_order_federate;
 DELETE FROM t_user_info;
-DELETE FROM t_order_calcite_sharding_0;
-DELETE FROM t_order_calcite_sharding_1;
-INSERT INTO t_order_calcite VALUES(1000, 10, 'init');
-INSERT INTO t_order_calcite VALUES(1001, 11, 'init');
+DELETE FROM t_order_federate_sharding_0;
+DELETE FROM t_order_federate_sharding_1;
+INSERT INTO t_order_federate VALUES(1000, 10, 'init');
+INSERT INTO t_order_federate VALUES(1001, 11, 'init');
 
 INSERT INTO t_user_info VALUES(0, 'description0');
 INSERT INTO t_user_info VALUES(1, 'description1');
 INSERT INTO t_user_info VALUES(2, 'description2');
 INSERT INTO t_user_info VALUES(3, 'description3');
-INSERT INTO t_order_calcite_sharding_0 VALUES(1010, 10, 'init');
-INSERT INTO t_order_calcite_sharding_1 VALUES(1011, 11, 'init');
-INSERT INTO t_order_calcite_sharding_0 VALUES(1100, 10, 'init');
-INSERT INTO t_order_calcite_sharding_1 VALUES(1101, 11, 'init');
+INSERT INTO t_order_federate_sharding_0 VALUES(1010, 10, 'init');
+INSERT INTO t_order_federate_sharding_1 VALUES(1011, 11, 'init');
+INSERT INTO t_order_federate_sharding_0 VALUES(1100, 10, 'init');
+INSERT INTO t_order_federate_sharding_1 VALUES(1101, 11, 'init');
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_1.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_1.sql
new file mode 100644
index 0000000..2d944c4
--- /dev/null
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_1.sql
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+DELETE FROM t_order_item_federate;
+DELETE FROM t_order_item_federate_sharding_0;
+DELETE FROM t_order_item_federate_sharding_1;
+DELETE FROM t_user_encrypt_federate;
+DELETE FROM t_user_encrypt_federate_sharding_0;
+DELETE FROM t_user_encrypt_federate_sharding_1;
+
+INSERT INTO t_order_item_federate VALUES(100000, 1000, 10, 'init');
+INSERT INTO t_order_item_federate VALUES(100001, 1000, 10, 'init');
+INSERT INTO t_order_item_federate VALUES(100100, 1001, 10, 'init');
+INSERT INTO t_order_item_federate VALUES(100101, 1001, 10, 'init');
+
+INSERT INTO t_order_item_federate_sharding_0 VALUES(1000, 10000, 10, 'init', 't_order_item_federate_sharding');
+INSERT INTO t_order_item_federate_sharding_1 VALUES(1001, 10001, 11, 'init', 't_order_item_federate_sharding');
+INSERT INTO t_order_item_federate_sharding_0 VALUES(1010, 10001, 10, 'init', 't_order_item_federate_sharding');
+INSERT INTO t_order_item_federate_sharding_1 VALUES(1011, 10001, 10, 'init', 't_order_item_federate_sharding');
+
+INSERT INTO t_user_encrypt_federate VALUES(0, 'plain password1', 'U2FsdGVkX19XstrYErommVKzbiaDrBzs5hkJnfw2iqY=', 'Rachel');
+INSERT INTO t_user_encrypt_federate VALUES(1, 'plain password2', 'U2FsdGVkX1+qxFaxftJmfwfUT8Q8e8QnNesNZjP9jLo=', 'Monica');
+INSERT INTO t_user_encrypt_federate VALUES(2, 'plain password3', 'U2FsdGVkX19d4VBBrjaSC7QX9tsdNFcpMNaZaxmJyYs=', 'Phoebe');
+INSERT INTO t_user_encrypt_federate VALUES(3, 'plain password4', 'U2FsdGVkX18viyM9JBybwvkks0qCmP56vojYnniqZOo=', 'Ross');
+INSERT INTO t_user_encrypt_federate VALUES(4, 'plain password5', 'U2FsdGVkX1+Lbc0iRrg/vk5BDQ+hHqbFEN7TFXztjro=', 'Chandler');
+INSERT INTO t_user_encrypt_federate VALUES(5, 'plain password6', 'U2FsdGVkX1/liIWOUCQ2W6sUgkGDSKZ/3QEiMTZtIsg=', 'Joey');
+
+INSERT INTO t_user_encrypt_federate_sharding_0 VALUES(0, 'plain passwordA', 'U2FsdGVkX1/TAZ4ul/UUIbvMJvbZ4SLibJzd7pwmDOM=', 'Rachel');
+INSERT INTO t_user_encrypt_federate_sharding_1 VALUES(1, 'plain passwordB', 'U2FsdGVkX1/EWOAnnTvPQIsdleGxw01nnnEa2VUk8vo=', 'Monica');
+INSERT INTO t_user_encrypt_federate_sharding_0 VALUES(2, 'plain passwordC', 'U2FsdGVkX19nXmysCFFcVtUFriy5ev7s0RsNT1XNJKg=', 'Phoebe');
+INSERT INTO t_user_encrypt_federate_sharding_1 VALUES(3, 'plain passwordD', 'U2FsdGVkX19KwrlD1BIcVtxGOSXGguAUCb2SydUhqRc=', 'Ross');
+INSERT INTO t_user_encrypt_federate_sharding_0 VALUES(4, 'plain passwordE', 'U2FsdGVkX1+70hUvvGH16ddUxpK1s5sJXQLQRNbcNeE=', 'Chandler');
+INSERT INTO t_user_encrypt_federate_sharding_1 VALUES(5, 'plain passwordF', 'U2FsdGVkX191hCfwkImzIRP1DIAK2M9FLgQSFHa1zlE=', 'Joey');
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_2.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_2.sql
new file mode 100644
index 0000000..2d944c4
--- /dev/null
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/federate_data_2.sql
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+DELETE FROM t_order_item_federate;
+DELETE FROM t_order_item_federate_sharding_0;
+DELETE FROM t_order_item_federate_sharding_1;
+DELETE FROM t_user_encrypt_federate;
+DELETE FROM t_user_encrypt_federate_sharding_0;
+DELETE FROM t_user_encrypt_federate_sharding_1;
+
+INSERT INTO t_order_item_federate VALUES(100000, 1000, 10, 'init');
+INSERT INTO t_order_item_federate VALUES(100001, 1000, 10, 'init');
+INSERT INTO t_order_item_federate VALUES(100100, 1001, 10, 'init');
+INSERT INTO t_order_item_federate VALUES(100101, 1001, 10, 'init');
+
+INSERT INTO t_order_item_federate_sharding_0 VALUES(1000, 10000, 10, 'init', 't_order_item_federate_sharding');
+INSERT INTO t_order_item_federate_sharding_1 VALUES(1001, 10001, 11, 'init', 't_order_item_federate_sharding');
+INSERT INTO t_order_item_federate_sharding_0 VALUES(1010, 10001, 10, 'init', 't_order_item_federate_sharding');
+INSERT INTO t_order_item_federate_sharding_1 VALUES(1011, 10001, 10, 'init', 't_order_item_federate_sharding');
+
+INSERT INTO t_user_encrypt_federate VALUES(0, 'plain password1', 'U2FsdGVkX19XstrYErommVKzbiaDrBzs5hkJnfw2iqY=', 'Rachel');
+INSERT INTO t_user_encrypt_federate VALUES(1, 'plain password2', 'U2FsdGVkX1+qxFaxftJmfwfUT8Q8e8QnNesNZjP9jLo=', 'Monica');
+INSERT INTO t_user_encrypt_federate VALUES(2, 'plain password3', 'U2FsdGVkX19d4VBBrjaSC7QX9tsdNFcpMNaZaxmJyYs=', 'Phoebe');
+INSERT INTO t_user_encrypt_federate VALUES(3, 'plain password4', 'U2FsdGVkX18viyM9JBybwvkks0qCmP56vojYnniqZOo=', 'Ross');
+INSERT INTO t_user_encrypt_federate VALUES(4, 'plain password5', 'U2FsdGVkX1+Lbc0iRrg/vk5BDQ+hHqbFEN7TFXztjro=', 'Chandler');
+INSERT INTO t_user_encrypt_federate VALUES(5, 'plain password6', 'U2FsdGVkX1/liIWOUCQ2W6sUgkGDSKZ/3QEiMTZtIsg=', 'Joey');
+
+INSERT INTO t_user_encrypt_federate_sharding_0 VALUES(0, 'plain passwordA', 'U2FsdGVkX1/TAZ4ul/UUIbvMJvbZ4SLibJzd7pwmDOM=', 'Rachel');
+INSERT INTO t_user_encrypt_federate_sharding_1 VALUES(1, 'plain passwordB', 'U2FsdGVkX1/EWOAnnTvPQIsdleGxw01nnnEa2VUk8vo=', 'Monica');
+INSERT INTO t_user_encrypt_federate_sharding_0 VALUES(2, 'plain passwordC', 'U2FsdGVkX19nXmysCFFcVtUFriy5ev7s0RsNT1XNJKg=', 'Phoebe');
+INSERT INTO t_user_encrypt_federate_sharding_1 VALUES(3, 'plain passwordD', 'U2FsdGVkX19KwrlD1BIcVtxGOSXGguAUCb2SydUhqRc=', 'Ross');
+INSERT INTO t_user_encrypt_federate_sharding_0 VALUES(4, 'plain passwordE', 'U2FsdGVkX1+70hUvvGH16ddUxpK1s5sJXQLQRNbcNeE=', 'Chandler');
+INSERT INTO t_user_encrypt_federate_sharding_1 VALUES(5, 'plain passwordF', 'U2FsdGVkX191hCfwkImzIRP1DIAK2M9FLgQSFHa1zlE=', 'Joey');
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_calcite_1.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_calcite_1.sql
deleted file mode 100644
index 1e9d27f..0000000
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_calcite_1.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-CREATE TABLE IF NOT EXISTS t_order_item_calcite (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (item_id));
-CREATE TABLE IF NOT EXISTS t_order_item_calcite_sharding_0 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, remarks VARCHAR(45) NULL, PRIMARY KEY (item_id));
-CREATE TABLE IF NOT EXISTS t_order_item_calcite_sharding_1 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, remarks VARCHAR(45) NULL, PRIMARY KEY (item_id));
-CREATE TABLE IF NOT EXISTS t_user_encrypt_calcite (user_id INT NOT NULL, plain_pwd VARCHAR(45) NULL, cipher_pwd VARCHAR(45) NULL, user_name VARCHAR(45) NULL, PRIMARY KEY (user_id));
-CREATE TABLE IF NOT EXISTS t_user_encrypt_calcite_sharding_0 (user_id INT NOT NULL, plain_pwd VARCHAR(45) NULL, cipher_pwd VARCHAR(45) NULL, user_name VARCHAR(45) NULL, PRIMARY KEY (user_id));
-CREATE TABLE IF NOT EXISTS t_user_encrypt_calcite_sharding_1 (user_id INT NOT NULL, plain_pwd VARCHAR(45) NULL, cipher_pwd VARCHAR(45) NULL, user_name VARCHAR(45) NULL, PRIMARY KEY (user_id));
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_calcite_0.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_federate_0.sql
similarity index 65%
rename from shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_calcite_0.sql
rename to shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_federate_0.sql
index df865aa..6d810f9 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_calcite_0.sql
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_federate_0.sql
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-CREATE TABLE IF NOT EXISTS t_order_calcite (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+CREATE TABLE IF NOT EXISTS t_order_federate (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
 CREATE TABLE IF NOT EXISTS t_user_info (user_id INT NOT NULL,  information VARCHAR(45) NULL, PRIMARY KEY (user_id));
-CREATE TABLE IF NOT EXISTS t_order_calcite_sharding_0 (order_id_sharding INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id_sharding));
-CREATE TABLE IF NOT EXISTS t_order_calcite_sharding_1 (order_id_sharding INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id_sharding));
+CREATE TABLE IF NOT EXISTS t_order_federate_sharding_0 (order_id_sharding INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id_sharding));
+CREATE TABLE IF NOT EXISTS t_order_federate_sharding_1 (order_id_sharding INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id_sharding));
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_federate_1.sql b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_federate_1.sql
new file mode 100644
index 0000000..ac30e17
--- /dev/null
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/resources/sql/jdbc_init_federate_1.sql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+CREATE TABLE IF NOT EXISTS t_order_item_federate (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (item_id));
+CREATE TABLE IF NOT EXISTS t_order_item_federate_sharding_0 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, remarks VARCHAR(45) NULL, PRIMARY KEY (item_id));
+CREATE TABLE IF NOT EXISTS t_order_item_federate_sharding_1 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, remarks VARCHAR(45) NULL, PRIMARY KEY (item_id));
+CREATE TABLE IF NOT EXISTS t_user_encrypt_federate (user_id INT NOT NULL, plain_pwd VARCHAR(45) NULL, cipher_pwd VARCHAR(45) NULL, user_name VARCHAR(45) NULL, PRIMARY KEY (user_id));
+CREATE TABLE IF NOT EXISTS t_user_encrypt_federate_sharding_0 (user_id INT NOT NULL, plain_pwd VARCHAR(45) NULL, cipher_pwd VARCHAR(45) NULL, user_name VARCHAR(45) NULL, PRIMARY KEY (user_id));
+CREATE TABLE IF NOT EXISTS t_user_encrypt_federate_sharding_1 (user_id INT NOT NULL, plain_pwd VARCHAR(45) NULL, cipher_pwd VARCHAR(45) NULL, user_name VARCHAR(45) NULL, PRIMARY KEY (user_id));