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 a810067d2b7 Refactor ShardingSphereSchema's protocolType (#37894)
a810067d2b7 is described below

commit a810067d2b7a8d07b7ec90255858c4c5056ddb70
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Jan 30 12:43:58 2026 +0800

    Refactor ShardingSphereSchema's protocolType (#37894)
    
    * Refactor ShardingSphereSchema's protocolType
    
    * Refactor ShardingSphereSchema's protocolType
---
 .../merge/dql/ShardingDQLResultMergerTest.java     |  4 +--
 .../dql/groupby/GroupByStreamMergedResultTest.java |  2 +-
 .../dql/orderby/OrderByStreamMergedResultTest.java |  2 +-
 .../standard/assertion/ShardingRouteAssert.java    |  2 +-
 .../MySQLShardingLogicTablesMergedResultTest.java  |  5 ++-
 ...SQLShardingShowCreateTableMergedResultTest.java |  2 +-
 ...SQLShardingShowTableStatusMergedResultTest.java |  5 ++-
 .../engine/GeneratedKeyContextEngineTest.java      |  2 +-
 .../schema/builder/SystemSchemaBuilder.java        |  2 +-
 .../schema/manager/GenericSchemaManager.java       |  4 +--
 .../schema/model/ShardingSphereSchema.java         |  2 +-
 .../schema/reviser/MetaDataReviseEngine.java       |  2 +-
 .../schema/builder/GenericSchemaBuilderTest.java   |  4 +--
 .../schema/manager/GenericSchemaManagerTest.java   | 31 ++++++++-----------
 .../schema/model/ShardingSphereSchemaTest.java     | 36 +++++++++++-----------
 .../schema/util/IndexMetaDataUtilsTest.java        |  2 +-
 .../sql/context/ExecutionContextBuilderTest.java   |  4 +--
 .../pipeline/cdc/util/CDCSchemaTableUtilsTest.java |  2 +-
 .../SingleDropSchemaSupportedCheckerTest.java      |  5 ++-
 .../table/SingleDropTableSupportedCheckerTest.java |  5 ++-
 .../compiler/it/SQLStatementCompilerIT.java        |  2 +-
 .../metadata/schema/SQLFederationDatabaseTest.java |  2 +-
 .../metadata/schema/SQLFederationSchemaTest.java   |  2 +-
 .../engine/SQLFederationEngineTest.java            |  2 +-
 .../memory/MemoryTableStatisticsBuilderTest.java   |  4 +--
 .../manager/database/DatabaseMetaDataManager.java  |  2 +-
 .../manager/resource/StorageUnitManager.java       |  4 +--
 .../service/SchemaMetaDataPersistService.java      |  5 ++-
 .../mode/manager/ContextManagerTest.java           |  6 ++--
 .../factory/MetaDataContextsFactoryTest.java       |  2 +-
 ...nfigurationMetaDataContextsInitFactoryTest.java |  4 +--
 ...isterCenterMetaDataContextsInitFactoryTest.java |  7 ++---
 .../database/DatabaseMetaDataManagerTest.java      |  2 +-
 .../manager/statistics/StatisticsManagerTest.java  |  2 +-
 .../DatabaseMetaDataPersistFacadeTest.java         |  7 ++---
 .../service/SchemaMetaDataPersistServiceTest.java  |  4 +--
 .../AlterViewFederationMetaDataRefresherTest.java  |  3 +-
 .../AlterIndexPushDownMetaDataRefresherTest.java   |  2 +-
 .../CreateIndexPushDownMetaDataRefresherTest.java  |  5 ++-
 .../DropIndexPushDownMetaDataRefresherTest.java    |  6 ++--
 .../AlterTablePushDownMetaDataRefresherTest.java   |  8 ++---
 .../CreateTablePushDownMetaDataRefresherTest.java  | 13 ++++----
 .../RenameTablePushDownMetaDataRefresherTest.java  |  2 +-
 .../AlterViewPushDownMetaDataRefresherTest.java    | 12 ++++----
 .../CreateViewPushDownMetaDataRefresherTest.java   |  8 ++---
 .../DistSQLQueryProxyBackendHandlerTest.java       |  2 +-
 .../export/ShowTableMetaDataExecutorTest.java      |  2 +-
 .../executor/show/MySQLShowTablesExecutorTest.java |  2 +-
 ...irebirdPrepareStatementCommandExecutorTest.java |  2 +-
 .../prepare/MySQLComStmtPrepareExecutorTest.java   |  2 +-
 ...ComStmtPrepareParameterMarkerExtractorTest.java |  2 +-
 .../query/MySQLComQueryPacketExecutorTest.java     |  2 +-
 .../opengauss/OpenGaussSQLParserEngineTest.java    |  2 +-
 .../parse/PostgreSQLComParseExecutorTest.java      |  2 +-
 .../binder/HavingCorrelatedSubqueryBinderIT.java   |  2 +-
 .../test/it/sql/binder/SQLBinderIT.java            |  2 +-
 .../engine/scenario/EncryptSQLRewriterIT.java      |  2 +-
 .../rewriter/engine/scenario/MixSQLRewriterIT.java |  2 +-
 .../engine/scenario/ShardingSQLRewriterIT.java     |  2 +-
 59 files changed, 127 insertions(+), 140 deletions(-)

diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/ShardingDQLResultMergerTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/ShardingDQLResultMergerTest.java
index d23b6eb7c21..74e5929205f 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/ShardingDQLResultMergerTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/ShardingDQLResultMergerTest.java
@@ -489,12 +489,12 @@ class ShardingDQLResultMergerTest {
     }
     
     private ShardingSphereDatabase createDatabase() {
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(createTable()), Collections.emptyList(), 
mysqlDatabaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
mysqlDatabaseType, Collections.singleton(createTable()), 
Collections.emptyList());
         return new ShardingSphereDatabase("foo_db", mysqlDatabaseType, 
mock(ResourceMetaData.class), mock(RuleMetaData.class), 
Collections.singleton(schema));
     }
     
     private ShardingSphereDatabase createSQLServerDatabase() {
-        ShardingSphereSchema schema = new ShardingSphereSchema("dbo", 
Collections.singleton(createTable()), Collections.emptyList(), 
sqlserverDatabaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("dbo", 
sqlserverDatabaseType, Collections.singleton(createTable()), 
Collections.emptyList());
         return new ShardingSphereDatabase(
                 "foo_db", TypedSPILoader.getService(DatabaseType.class, 
"SQLServer"), mock(ResourceMetaData.class), mock(RuleMetaData.class), 
Collections.singleton(schema));
     }
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/groupby/GroupByStreamMergedResultTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/groupby/GroupByStreamMergedResultTest.java
index ed8503b4bf4..4fff89192c9 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/groupby/GroupByStreamMergedResultTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/groupby/GroupByStreamMergedResultTest.java
@@ -184,7 +184,7 @@ class GroupByStreamMergedResultTest {
         ShardingSphereColumn column2 = new ShardingSphereColumn("col2", 0, 
false, false, false, true, false, false);
         ShardingSphereColumn column3 = new ShardingSphereColumn("col3", 0, 
false, false, false, true, false, false);
         ShardingSphereTable table = new ShardingSphereTable("tbl", 
Arrays.asList(column1, column2, column3), Collections.emptyList(), 
Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         return new ShardingSphereDatabase("foo_db", databaseType, 
mock(ResourceMetaData.class), mock(RuleMetaData.class), 
Collections.singleton(schema));
     }
     
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByStreamMergedResultTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByStreamMergedResultTest.java
index bebb4193b62..29aaffd7bfb 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByStreamMergedResultTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByStreamMergedResultTest.java
@@ -208,7 +208,7 @@ class OrderByStreamMergedResultTest {
         ShardingSphereColumn column1 = new ShardingSphereColumn("col1", 0, 
false, false, true, true, false, false);
         ShardingSphereColumn column2 = new ShardingSphereColumn("col2", 0, 
false, false, false, true, false, false);
         ShardingSphereTable table = new ShardingSphereTable("tbl", 
Arrays.asList(column1, column2), Collections.emptyList(), 
Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         return new ShardingSphereDatabase("foo_db", databaseType, 
mock(ResourceMetaData.class), mock(RuleMetaData.class), 
Collections.singleton(schema));
     }
 }
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/assertion/ShardingRouteAssert.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/assertion/ShardingRouteAssert.java
index ab5cb35ab96..bbfce20a528 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/assertion/ShardingRouteAssert.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/assertion/ShardingRouteAssert.java
@@ -118,6 +118,6 @@ public final class ShardingRouteAssert {
                 Collections.emptyList(), Collections.emptyList()));
         tables.add(new ShardingSphereTable("t_hint_test", 
Collections.singleton(new ShardingSphereColumn("user_id", Types.INTEGER, true, 
false, false, true, false, false)),
                 Collections.emptyList(), Collections.emptyList()));
-        return Collections.singleton(new ShardingSphereSchema("foo_db", 
tables, Collections.emptyList(), mock(DatabaseType.class)));
+        return Collections.singleton(new ShardingSphereSchema("foo_db", 
mock(DatabaseType.class), tables, Collections.emptyList()));
     }
 }
diff --git 
a/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingLogicTablesMergedResultTest.java
 
b/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingLogicTablesMergedResultTest.java
index 85a53380df1..7f75a751adb 100644
--- 
a/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingLogicTablesMergedResultTest.java
+++ 
b/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingLogicTablesMergedResultTest.java
@@ -49,9 +49,8 @@ class MySQLShardingLogicTablesMergedResultTest {
     @BeforeEach
     void setUp() {
         rule = createShardingRule();
-        schema = new ShardingSphereSchema("foo_db",
-                Collections.singleton(new ShardingSphereTable("table", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList(),
-                mock(DatabaseType.class));
+        schema = new ShardingSphereSchema("foo_db", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("table", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList());
     }
     
     private ShardingRule createShardingRule() {
diff --git 
a/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowCreateTableMergedResultTest.java
 
b/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowCreateTableMergedResultTest.java
index 37363c5e8f1..7dacbfc27c4 100644
--- 
a/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowCreateTableMergedResultTest.java
+++ 
b/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowCreateTableMergedResultTest.java
@@ -68,7 +68,7 @@ class MySQLShardingShowCreateTableMergedResultTest {
         Collection<ShardingSphereTable> tables = new LinkedList<>();
         tables.add(new ShardingSphereTable("foo_tbl", Collections.emptyList(), 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereConstraint("foo_tbl_foreign_key", "bar_tbl"))));
         tables.add(new ShardingSphereTable("bar_tbl", Collections.emptyList(), 
Collections.emptyList(), Collections.emptyList()));
-        return new ShardingSphereSchema("foo_db", tables, 
Collections.emptyList(), mock(DatabaseType.class));
+        return new ShardingSphereSchema("foo_db", mock(DatabaseType.class), 
tables, Collections.emptyList());
     }
     
     @Test
diff --git 
a/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowTableStatusMergedResultTest.java
 
b/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowTableStatusMergedResultTest.java
index 3207a18c27f..a5e1316ce01 100644
--- 
a/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowTableStatusMergedResultTest.java
+++ 
b/features/sharding/dialect/mysql/src/test/java/org/apache/shardingsphere/sharding/merge/mysql/type/MySQLShardingShowTableStatusMergedResultTest.java
@@ -58,9 +58,8 @@ class MySQLShardingShowTableStatusMergedResultTest {
     @BeforeEach
     void setUp() {
         rule = buildShardingRule();
-        schema = new ShardingSphereSchema("foo_db",
-                Collections.singleton(new ShardingSphereTable("table", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList(),
-                mock(DatabaseType.class));
+        schema = new ShardingSphereSchema("foo_db", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("table", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList());
     }
     
     private ShardingRule buildShardingRule() {
diff --git 
a/infra/binder/core/src/test/java/org/apache/shardingsphere/infra/binder/context/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
 
b/infra/binder/core/src/test/java/org/apache/shardingsphere/infra/binder/context/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
index f59c8fbe0c3..91de093e15a 100644
--- 
a/infra/binder/core/src/test/java/org/apache/shardingsphere/infra/binder/context/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
+++ 
b/infra/binder/core/src/test/java/org/apache/shardingsphere/infra/binder/context/segment/insert/keygen/engine/GeneratedKeyContextEngineTest.java
@@ -64,7 +64,7 @@ class GeneratedKeyContextEngineTest {
                 "foo_tbl", Collections.singletonList(new 
ShardingSphereColumn("id", Types.INTEGER, true, true, false, true, false, 
false)), Collections.emptyList(), Collections.emptyList());
         ShardingSphereTable barTable = new ShardingSphereTable(
                 "bar_tbl", Collections.singletonList(new 
ShardingSphereColumn("ID", Types.INTEGER, true, true, false, true, false, 
false)), Collections.emptyList(), Collections.emptyList());
-        schema = new ShardingSphereSchema("foo_db", Arrays.asList(fooTable, 
barTable), Collections.emptyList(), databaseType);
+        schema = new ShardingSphereSchema("foo_db", databaseType, 
Arrays.asList(fooTable, barTable), Collections.emptyList());
     }
     
     @Test
diff --git 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilder.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilder.java
index 39014631537..2a381a213fa 100644
--- 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilder.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilder.java
@@ -84,6 +84,6 @@ public final class SystemSchemaBuilder {
                 tables.add(TABLE_SWAPPER.swapToObject(metaData));
             }
         }
-        return new ShardingSphereSchema(schemaName, tables, 
Collections.emptyList(), databaseType);
+        return new ShardingSphereSchema(schemaName, databaseType, tables, 
Collections.emptyList());
     }
 }
diff --git 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManager.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManager.java
index b310eab7bec..225537f76c5 100644
--- 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManager.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManager.java
@@ -49,7 +49,7 @@ public final class GenericSchemaManager {
     }
     
     private static ShardingSphereSchema 
getToBeAlteredSchemaWithTablesAdded(final ShardingSphereSchema reloadSchema, 
final ShardingSphereSchema currentSchema) {
-        return new ShardingSphereSchema(currentSchema.getName(), 
getToBeAddedTables(reloadSchema, currentSchema), new LinkedList<>(), 
reloadSchema.getProtocolType());
+        return new ShardingSphereSchema(currentSchema.getName(), 
reloadSchema.getProtocolType(), getToBeAddedTables(reloadSchema, 
currentSchema), new LinkedList<>());
     }
     
     /**
@@ -79,7 +79,7 @@ public final class GenericSchemaManager {
     }
     
     private static ShardingSphereSchema 
getToBeAlteredSchemaWithTablesDropped(final ShardingSphereSchema reloadSchema, 
final ShardingSphereSchema currentSchema) {
-        return new ShardingSphereSchema(currentSchema.getName(), 
getToBeDroppedTables(reloadSchema, currentSchema), new LinkedList<>(), 
reloadSchema.getProtocolType());
+        return new ShardingSphereSchema(currentSchema.getName(), 
reloadSchema.getProtocolType(), getToBeDroppedTables(reloadSchema, 
currentSchema), new LinkedList<>());
     }
     
     /**
diff --git 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchema.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchema.java
index 42d4f8a64d9..fbca13e7260 100644
--- 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchema.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchema.java
@@ -50,7 +50,7 @@ public final class ShardingSphereSchema {
         views = new ConcurrentHashMap<>();
     }
     
-    public ShardingSphereSchema(final String name, final 
Collection<ShardingSphereTable> tables, final Collection<ShardingSphereView> 
views, final DatabaseType protocolType) {
+    public ShardingSphereSchema(final String name, final DatabaseType 
protocolType, final Collection<ShardingSphereTable> tables, final 
Collection<ShardingSphereView> views) {
         this.name = name;
         this.protocolType = protocolType;
         this.tables = new ConcurrentHashMap<>(tables.size(), 1F);
diff --git 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/reviser/MetaDataReviseEngine.java
 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/reviser/MetaDataReviseEngine.java
index 6f3e77c124a..d1d510d7f3d 100644
--- 
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/reviser/MetaDataReviseEngine.java
+++ 
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/reviser/MetaDataReviseEngine.java
@@ -65,7 +65,7 @@ public final class MetaDataReviseEngine {
         Map<String, ShardingSphereSchema> result = new 
HashMap<>(schemaMetaDataMap.size(), 1F);
         for (Entry<String, SchemaMetaData> entry : 
schemaMetaDataMap.entrySet()) {
             SchemaMetaData schemaMetaData = new 
SchemaMetaDataReviseEngine(rules, material.getProps()).revise(entry.getValue());
-            result.put(entry.getKey(), new 
ShardingSphereSchema(entry.getKey(), 
convertToTables(schemaMetaData.getTables()), new LinkedList<>(), protocolType));
+            result.put(entry.getKey(), new 
ShardingSphereSchema(entry.getKey(), protocolType, 
convertToTables(schemaMetaData.getTables()), new LinkedList<>()));
         }
         return result;
     }
diff --git 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/GenericSchemaBuilderTest.java
 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/GenericSchemaBuilderTest.java
index e1f179464ed..99cd90cec69 100644
--- 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/GenericSchemaBuilderTest.java
+++ 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/GenericSchemaBuilderTest.java
@@ -93,7 +93,7 @@ class GenericSchemaBuilderTest {
         
when(MetaDataLoader.load(any())).thenReturn(createSchemaMetaDataMap(tableNames, 
material));
         Map<String, ShardingSphereSchema> actual = 
GenericSchemaBuilder.build(tableNames, databaseType, material);
         assertThat(actual.size(), is(1));
-        assertTables(new ShardingSphereSchema("foo_schema", 
actual.values().iterator().next().getAllTables(), Collections.emptyList(), 
databaseType));
+        assertTables(new ShardingSphereSchema("foo_schema", databaseType, 
actual.values().iterator().next().getAllTables(), Collections.emptyList()));
     }
     
     @Test
@@ -115,7 +115,7 @@ class GenericSchemaBuilderTest {
                 Collections.singletonMap("foo_schema", 
material.getStorageUnits().get("foo_schema")), Collections.singleton(rule), new 
ConfigurationProperties(new Properties()), "foo_schema");
         Map<String, ShardingSphereSchema> actual = 
GenericSchemaBuilder.build(databaseType, newMaterial);
         assertThat(actual.size(), is(1));
-        assertTables(new ShardingSphereSchema("foo_schema", 
actual.values().iterator().next().getAllTables(), Collections.emptyList(), 
databaseType));
+        assertTables(new ShardingSphereSchema("foo_schema", databaseType, 
actual.values().iterator().next().getAllTables(), Collections.emptyList()));
     }
     
     @Test
diff --git 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManagerTest.java
 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManagerTest.java
index f61010d861b..b3a6efe4cb1 100644
--- 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManagerTest.java
+++ 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/manager/GenericSchemaManagerTest.java
@@ -38,10 +38,9 @@ class GenericSchemaManagerTest {
     @Test
     void assertGetToBeAlteredSchemasWithTablesAdded() {
         ShardingSphereDatabase reloadDatabase = 
mock(ShardingSphereDatabase.class);
-        
when(reloadDatabase.getAllSchemas()).thenReturn(Collections.singleton(new 
ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList(),
-                mock(DatabaseType.class))));
-        ShardingSphereSchema currentSchemas = new 
ShardingSphereSchema("foo_schema", Collections.emptyList(), 
Collections.emptyList(), mock(DatabaseType.class));
+        
when(reloadDatabase.getAllSchemas()).thenReturn(Collections.singleton(new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList())));
+        ShardingSphereSchema currentSchemas = new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class), 
Collections.emptyList(), Collections.emptyList());
         ShardingSphereDatabase currentDatabase = 
mock(ShardingSphereDatabase.class);
         
when(currentDatabase.getAllSchemas()).thenReturn(Collections.singleton(currentSchemas));
         when(currentDatabase.containsSchema("foo_schema")).thenReturn(true);
@@ -56,12 +55,10 @@ class GenericSchemaManagerTest {
     void assertGetToBeAlteredSchemasWithTablesDropped() {
         ShardingSphereDatabase reloadDatabase = 
mock(ShardingSphereDatabase.class);
         when(reloadDatabase.containsSchema("foo_schema")).thenReturn(true);
-        when(reloadDatabase.getSchema("foo_schema")).thenReturn(new 
ShardingSphereSchema("foo_schema", Collections.emptyList(), 
Collections.emptyList(),
-                mock(DatabaseType.class)));
+        when(reloadDatabase.getSchema("foo_schema")).thenReturn(new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class), 
Collections.emptyList(), Collections.emptyList()));
         ShardingSphereDatabase currentDatabase = 
mock(ShardingSphereDatabase.class);
-        
when(currentDatabase.getAllSchemas()).thenReturn(Collections.singleton(new 
ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList(),
-                mock(DatabaseType.class))));
+        
when(currentDatabase.getAllSchemas()).thenReturn(Collections.singleton(new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList())));
         Collection<ShardingSphereSchema> actual = 
GenericSchemaManager.getToBeAlteredSchemasWithTablesDropped(reloadDatabase, 
currentDatabase);
         assertThat(actual.size(), is(1));
         assertThat(actual.iterator().next().getAllTables().size(), is(1));
@@ -70,21 +67,19 @@ class GenericSchemaManagerTest {
     
     @Test
     void assertGetToBeAddedTables() {
-        ShardingSphereSchema reloadSchema = new 
ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList(),
-                mock(DatabaseType.class));
-        Collection<ShardingSphereTable> actual = 
GenericSchemaManager.getToBeAddedTables(reloadSchema, new 
ShardingSphereSchema("foo_schema", Collections.emptyList(), 
Collections.emptyList(),
-                mock(DatabaseType.class)));
+        ShardingSphereSchema reloadSchema = new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList());
+        Collection<ShardingSphereTable> actual = 
GenericSchemaManager.getToBeAddedTables(
+                reloadSchema, new ShardingSphereSchema("foo_schema", 
mock(DatabaseType.class), Collections.emptyList(), Collections.emptyList()));
         assertThat(actual.size(), is(1));
         assertThat(actual.iterator().next().getName(), is("foo_tbl"));
     }
     
     @Test
     void assertGetToBeDroppedTables() {
-        ShardingSphereSchema reloadSchema = new 
ShardingSphereSchema("foo_schema", Collections.emptyList(), 
Collections.emptyList(), mock(DatabaseType.class));
-        ShardingSphereSchema currentSchema = new 
ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList(),
-                mock(DatabaseType.class));
+        ShardingSphereSchema reloadSchema = new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class), 
Collections.emptyList(), Collections.emptyList());
+        ShardingSphereSchema currentSchema = new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList());
         Collection<ShardingSphereTable> actual = 
GenericSchemaManager.getToBeDroppedTables(reloadSchema, currentSchema);
         assertThat(actual.size(), is(1));
         assertThat(actual.iterator().next().getName(), is("foo_tbl"));
diff --git 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchemaTest.java
 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchemaTest.java
index a7d7a80f630..5a987641281 100644
--- 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchemaTest.java
+++ 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/model/ShardingSphereSchemaTest.java
@@ -40,7 +40,7 @@ class ShardingSphereSchemaTest {
     void assertGetAllTables() {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        assertThat(new HashSet<>(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType)
+        assertThat(new HashSet<>(new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList())
                 .getAllTables()), is(Collections.singleton(table)));
     }
     
@@ -48,14 +48,14 @@ class ShardingSphereSchemaTest {
     void assertContainsTable() {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        assertTrue(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), 
databaseType).containsTable("foo_tbl"));
+        assertTrue(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), 
Collections.emptyList()).containsTable("foo_tbl"));
     }
     
     @Test
     void assertGetTable() {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        assertThat(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), 
databaseType).getTable("foo_tbl"), is(table));
+        assertThat(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), Collections.emptyList()).getTable("foo_tbl"), 
is(table));
     }
     
     @Test
@@ -71,7 +71,7 @@ class ShardingSphereSchemaTest {
     void assertRemoveTable() {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         schema.removeTable("foo_tbl");
         assertNull(schema.getTable("foo_tbl"));
     }
@@ -80,7 +80,7 @@ class ShardingSphereSchemaTest {
     void assertGetAllViews() {
         ShardingSphereView view = mock(ShardingSphereView.class);
         when(view.getName()).thenReturn("foo_view");
-        assertThat(new HashSet<>(new ShardingSphereSchema("foo_db", 
Collections.emptyList(), Collections.singleton(view), databaseType)
+        assertThat(new HashSet<>(new ShardingSphereSchema("foo_db", 
databaseType, Collections.emptyList(), Collections.singleton(view))
                 .getAllViews()), is(Collections.singleton(view)));
     }
     
@@ -88,27 +88,27 @@ class ShardingSphereSchemaTest {
     void assertContainsView() {
         ShardingSphereView view = mock(ShardingSphereView.class);
         when(view.getName()).thenReturn("foo_view");
-        assertTrue(new ShardingSphereSchema("foo_db", Collections.emptyList(), 
Collections.singleton(view), databaseType).containsView("foo_view"));
+        assertTrue(new ShardingSphereSchema("foo_db", databaseType, 
Collections.emptyList(), Collections.singleton(view)).containsView("foo_view"));
     }
     
     @Test
     void assertGetView() {
         ShardingSphereView view = mock(ShardingSphereView.class);
         when(view.getName()).thenReturn("foo_view");
-        assertThat(new ShardingSphereSchema("foo_db", Collections.emptyList(), 
Collections.singleton(view), databaseType).getView("foo_view"), is(view));
+        assertThat(new ShardingSphereSchema("foo_db", databaseType, 
Collections.emptyList(), Collections.singleton(view)).getView("foo_view"), 
is(view));
     }
     
     @Test
     void assertPutView() {
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.emptyList(), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.emptyList(), Collections.emptyList());
         schema.putView(new ShardingSphereView("foo_view", "SELECT * FROM 
test_table"));
         assertTrue(schema.containsView("foo_view"));
     }
     
     @Test
     void assertRemoveView() {
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.emptyList(),
-                Collections.singleton(new ShardingSphereView("foo_view", 
"SELECT * FROM test_table")), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.emptyList(),
+                Collections.singleton(new ShardingSphereView("foo_view", 
"SELECT * FROM test_table")));
         schema.removeView("foo_view");
         assertFalse(schema.containsView("foo_view"));
     }
@@ -117,14 +117,14 @@ class ShardingSphereSchemaTest {
     void assertContainsIndex() {
         ShardingSphereTable table = new ShardingSphereTable(
                 "foo_tbl", Collections.emptyList(), Collections.singleton(new 
ShardingSphereIndex("col_idx", Collections.emptyList(), false)), 
Collections.emptyList());
-        assertTrue(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), 
databaseType).containsIndex("foo_tbl", "col_idx"));
+        assertTrue(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), Collections.emptyList()).containsIndex("foo_tbl", 
"col_idx"));
     }
     
     @Test
     void assertContainsIndexWithIndexNotExists() {
         ShardingSphereTable table = new ShardingSphereTable(
                 "foo_tbl", Collections.emptyList(), Collections.singleton(new 
ShardingSphereIndex("col_idx", Collections.emptyList(), false)), 
Collections.emptyList());
-        assertFalse(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), 
databaseType).containsIndex("foo_tbl", "foo_idx"));
+        assertFalse(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), Collections.emptyList()).containsIndex("foo_tbl", 
"foo_idx"));
     }
     
     @Test
@@ -134,28 +134,28 @@ class ShardingSphereSchemaTest {
     
     @Test
     void assertGetVisibleColumnNamesWhenTableNotExists() {
-        assertTrue(new ShardingSphereSchema("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), 
databaseType).getVisibleColumnNames("nonexistent_tbl").isEmpty());
+        assertTrue(new ShardingSphereSchema("foo_tbl", databaseType, 
Collections.emptyList(), 
Collections.emptyList()).getVisibleColumnNames("nonexistent_tbl").isEmpty());
     }
     
     @Test
     void assertGetVisibleColumnNamesWhenContainsKey() {
         ShardingSphereTable table = new ShardingSphereTable("foo_tbl", 
Collections.singletonList(
                 new ShardingSphereColumn("foo_col", 0, false, false, false, 
true, false, false)), Collections.emptyList(), Collections.emptyList());
-        assertThat(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), 
databaseType).getVisibleColumnNames("foo_tbl"), 
is(Collections.singletonList("foo_col")));
+        assertThat(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), 
Collections.emptyList()).getVisibleColumnNames("foo_tbl"), 
is(Collections.singletonList("foo_col")));
     }
     
     @Test
     void assertGetVisibleColumnNamesWhenNotContainsKey() {
         ShardingSphereTable table = new ShardingSphereTable("foo_tbl", 
Collections.singletonList(
                 new ShardingSphereColumn("foo_col", 0, false, false, false, 
false, true, false)), Collections.emptyList(), Collections.emptyList());
-        assertTrue(new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), 
databaseType).getVisibleColumnNames("foo_tbl").isEmpty());
+        assertTrue(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), 
Collections.emptyList()).getVisibleColumnNames("foo_tbl").isEmpty());
     }
     
     @Test
     void assertGetVisibleColumnAndIndexMapWhenContainsTable() {
         ShardingSphereColumn column = new ShardingSphereColumn("foo_col", 0, 
false, false, false, true, false, false);
         ShardingSphereTable table = new ShardingSphereTable("foo_tbl", 
Collections.singletonList(column), Collections.emptyList(), 
Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         Map<String, Integer> actual = 
schema.getVisibleColumnAndIndexMap("foo_tbl");
         assertThat(actual.size(), is(1));
         assertTrue(actual.containsKey("foo_col"));
@@ -168,12 +168,12 @@ class ShardingSphereSchemaTest {
     
     @Test
     void assertIsEmptyWithEmptyTable() {
-        assertFalse(new ShardingSphereSchema("foo_db", 
Collections.singleton(mock()), Collections.emptyList(), 
databaseType).isEmpty());
+        assertFalse(new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(mock()), Collections.emptyList()).isEmpty());
     }
     
     @Test
     void assertIsEmptyWithEmptyView() {
-        assertFalse(new ShardingSphereSchema("foo_db", 
Collections.emptyList(), Collections.singleton(mock()), 
databaseType).isEmpty());
+        assertFalse(new ShardingSphereSchema("foo_db", databaseType, 
Collections.emptyList(), Collections.singleton(mock())).isEmpty());
     }
     
     @Test
diff --git 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/IndexMetaDataUtilsTest.java
 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/IndexMetaDataUtilsTest.java
index 5c4e2d064de..3cf6b8f0f17 100644
--- 
a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/IndexMetaDataUtilsTest.java
+++ 
b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/IndexMetaDataUtilsTest.java
@@ -77,7 +77,7 @@ class IndexMetaDataUtilsTest {
     private ShardingSphereDatabase buildDatabase() {
         ShardingSphereTable table = new ShardingSphereTable(
                 "foo_tbl", Collections.emptyList(), Collections.singleton(new 
ShardingSphereIndex("foo_idx", Collections.emptyList(), false)), 
Collections.emptyList());
-        Collection<ShardingSphereSchema> schemas = Collections.singleton(new 
ShardingSphereSchema("foo_db", Collections.singleton(table), 
Collections.emptyList(), mock(DatabaseType.class)));
+        Collection<ShardingSphereSchema> schemas = Collections.singleton(new 
ShardingSphereSchema("foo_db", mock(DatabaseType.class), 
Collections.singleton(table), Collections.emptyList()));
         return new ShardingSphereDatabase("foo_db", mock(DatabaseType.class), 
mock(ResourceMetaData.class), mock(RuleMetaData.class), schemas);
     }
 }
diff --git 
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContextBuilderTest.java
 
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContextBuilderTest.java
index 1f0fe48e55e..5a43d2f449f 100644
--- 
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContextBuilderTest.java
+++ 
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContextBuilderTest.java
@@ -141,7 +141,7 @@ class ExecutionContextBuilderTest {
                 new ShardingSphereColumn("c_date", Types.TIMESTAMP, false, 
false, false, true, false, false)), Collections.emptySet(), 
Collections.emptyList()));
         tables.add(new ShardingSphereTable("t_other", 
Collections.singletonList(
                 new ShardingSphereColumn("order_id", Types.INTEGER, true, 
false, false, true, false, false)), Collections.emptySet(), 
Collections.emptyList()));
-        return Collections.singleton(new ShardingSphereSchema("name", tables, 
Collections.emptyList(), mock(DatabaseType.class)));
+        return Collections.singleton(new ShardingSphereSchema("name", 
mock(DatabaseType.class), tables, Collections.emptyList()));
     }
     
     private Collection<ShardingSphereSchema> buildSchemasWithoutPrimaryKey() {
@@ -151,6 +151,6 @@ class ExecutionContextBuilderTest {
                 new ShardingSphereColumn("status", Types.INTEGER, false, 
false, false, true, false, false)), Collections.emptySet(), 
Collections.emptyList()));
         tables.add(new ShardingSphereTable("t_other", 
Collections.singletonList(
                 new ShardingSphereColumn("order_id", Types.INTEGER, true, 
false, false, true, false, false)), Collections.emptySet(), 
Collections.emptyList()));
-        return Collections.singleton(new ShardingSphereSchema("name", tables, 
Collections.emptyList(), mock(DatabaseType.class)));
+        return Collections.singleton(new ShardingSphereSchema("name", 
mock(DatabaseType.class), tables, Collections.emptyList()));
     }
 }
diff --git 
a/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/CDCSchemaTableUtilsTest.java
 
b/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/CDCSchemaTableUtilsTest.java
index 4d1e04eca56..2e499eaff10 100644
--- 
a/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/CDCSchemaTableUtilsTest.java
+++ 
b/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/CDCSchemaTableUtilsTest.java
@@ -120,7 +120,7 @@ class CDCSchemaTableUtilsTest {
         for (String each : tableNames) {
             tables.add(mockTable(each));
         }
-        return new ShardingSphereSchema(schemaName, tables, 
Collections.emptyList(), databaseType);
+        return new ShardingSphereSchema(schemaName, databaseType, tables, 
Collections.emptyList());
     }
     
     private ShardingSphereTable mockTable(final String tableName) {
diff --git 
a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/schema/SingleDropSchemaSupportedCheckerTest.java
 
b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/schema/SingleDropSchemaSupportedCheckerTest.java
index d2cdef953c9..ca4d242d738 100644
--- 
a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/schema/SingleDropSchemaSupportedCheckerTest.java
+++ 
b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/schema/SingleDropSchemaSupportedCheckerTest.java
@@ -69,9 +69,8 @@ class SingleDropSchemaSupportedCheckerTest {
     
     private ShardingSphereDatabase mockDatabase() {
         ShardingSphereDatabase result = mock(ShardingSphereDatabase.class, 
RETURNS_DEEP_STUBS);
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList(),
-                mock(DatabaseType.class));
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList());
         when(result.getAllSchemas()).thenReturn(Collections.singleton(schema));
         return result;
     }
diff --git 
a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/table/SingleDropTableSupportedCheckerTest.java
 
b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/table/SingleDropTableSupportedCheckerTest.java
index 0a2b75ecc11..54e6aad9c7d 100644
--- 
a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/table/SingleDropTableSupportedCheckerTest.java
+++ 
b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/checker/sql/table/SingleDropTableSupportedCheckerTest.java
@@ -59,9 +59,8 @@ class SingleDropTableSupportedCheckerTest {
     
     private ShardingSphereDatabase mockDatabase() {
         ShardingSphereDatabase result = mock(ShardingSphereDatabase.class, 
RETURNS_DEEP_STUBS);
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList(),
-                mock(DatabaseType.class));
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), 
TableType.TABLE)), Collections.emptyList());
         when(result.getAllSchemas()).thenReturn(Collections.singleton(schema));
         return result;
     }
diff --git 
a/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
 
b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
index d853d44134a..02d6a730d99 100644
--- 
a/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
+++ 
b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/compiler/it/SQLStatementCompilerIT.java
@@ -82,7 +82,7 @@ class SQLStatementCompilerIT {
         tables.add(createMultiTypesSecondTableMetaData());
         CalciteSchema calciteSchema = CalciteSchema.createRootSchema(true);
         DatabaseType databaseType = 
TypedSPILoader.getService(DatabaseType.class, "H2");
-        calciteSchema.add(SCHEMA_NAME, new SQLFederationSchema(SCHEMA_NAME, 
new ShardingSphereSchema("foo_db", tables, Collections.emptyList(), 
databaseType), databaseType));
+        calciteSchema.add(SCHEMA_NAME, new SQLFederationSchema(SCHEMA_NAME, 
new ShardingSphereSchema("foo_db", databaseType, tables, 
Collections.emptyList()), databaseType));
         sqlStatementCompiler = new SQLStatementCompiler(
                 new SQLFederationRelConverter(new 
CompilerContext(mock(SQLParserRule.class), calciteSchema, new 
CalciteConnectionConfigImpl(new Properties()), getOperatorTables()),
                         Collections.singletonList("federate_jdbc"), 
databaseType, EnumerableConvention.INSTANCE),
diff --git 
a/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabaseTest.java
 
b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabaseTest.java
index 2827ee6c342..a56bc5a9be6 100644
--- 
a/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabaseTest.java
+++ 
b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationDatabaseTest.java
@@ -41,7 +41,7 @@ class SQLFederationDatabaseTest {
     
     @Test
     void assertNew() {
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
Collections.singleton(createTable()), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(createTable()), Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase("foo_db", 
databaseType, mock(ResourceMetaData.class), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         SQLFederationDatabase actual = new SQLFederationDatabase(database, 
databaseType);
         assertThat(actual.getName(), is("foo_db"));
diff --git 
a/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchemaTest.java
 
b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchemaTest.java
index 63b7cb3c2d0..a4c980f4e37 100644
--- 
a/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchemaTest.java
+++ 
b/kernel/sql-federation/compiler/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/schema/SQLFederationSchemaTest.java
@@ -43,7 +43,7 @@ class SQLFederationSchemaTest {
     void assertNew() {
         Collection<ShardingSphereTable> tables = 
Arrays.asList(createTable("foo_table"), createTable("foo_view"));
         Collection<ShardingSphereView> views = Collections.singleton(new 
ShardingSphereView("foo_view", "SELECT 1"));
-        SQLFederationSchema actual = new SQLFederationSchema("foo_schema", new 
ShardingSphereSchema("foo_schema", tables, views, databaseType), databaseType);
+        SQLFederationSchema actual = new SQLFederationSchema("foo_schema", new 
ShardingSphereSchema("foo_schema", databaseType, tables, views), databaseType);
         assertThat(actual.getName(), is("foo_schema"));
         assertThat(actual.getTableMap().get("foo_table"), 
isA(SQLFederationTable.class));
         assertThat(actual.getTableMap().get("foo_view"), isA(ViewTable.class));
diff --git 
a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngineTest.java
 
b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngineTest.java
index 6080c9c9daa..aada064fb1e 100644
--- 
a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngineTest.java
+++ 
b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/engine/SQLFederationEngineTest.java
@@ -490,7 +490,7 @@ class SQLFederationEngineTest {
     }
     
     private ShardingSphereMetaData createMetaData(final 
Collection<ShardingSphereTable> tables, final Properties props) {
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
tables, Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType, tables, Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         SQLFederationRuleConfiguration ruleConfig = new 
SQLFederationRuleConfiguration(true, false, cacheOption);
diff --git 
a/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/enumerator/memory/MemoryTableStatisticsBuilderTest.java
 
b/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/enumerator/memory/MemoryTableStatisticsBuilderTest.java
index 177d3d16596..6c635b80c1a 100644
--- 
a/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/enumerator/memory/MemoryTableStatisticsBuilderTest.java
+++ 
b/kernel/sql-federation/executor/src/test/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/enumerator/memory/MemoryTableStatisticsBuilderTest.java
@@ -67,8 +67,8 @@ class MemoryTableStatisticsBuilderTest {
     void assertBuildTableData() {
         DialectDriverQuerySystemCatalogOption option = 
mock(DialectDriverQuerySystemCatalogOption.class);
         when(option.isTableDataTable("pg_tables")).thenReturn(true);
-        ShardingSphereSchema schema1 = new ShardingSphereSchema("public", 
Collections.singleton(mockTable("t_order")), Collections.emptyList(), 
mock(DatabaseType.class));
-        ShardingSphereSchema schema2 = new ShardingSphereSchema("logic", 
Collections.singleton(mockTable("t_user")), Collections.emptyList(), 
mock(DatabaseType.class));
+        ShardingSphereSchema schema1 = new ShardingSphereSchema("public", 
mock(DatabaseType.class), Collections.singleton(mockTable("t_order")), 
Collections.emptyList());
+        ShardingSphereSchema schema2 = new ShardingSphereSchema("logic", 
mock(DatabaseType.class), Collections.singleton(mockTable("t_user")), 
Collections.emptyList());
         ShardingSphereDatabase database = mockDatabase("foo_db", 
Arrays.asList(schema1, schema2));
         ShardingSphereMetaData metaData = 
createMetaData(Collections.singleton(database), new 
RuleMetaData(Collections.emptyList()));
         TableStatistics actual = 
MemoryTableStatisticsBuilder.buildTableStatistics(mockTable("pg_tables"), 
metaData, option);
diff --git 
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManager.java
 
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManager.java
index cc150f5554d..53d1c54c6da 100644
--- 
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManager.java
+++ 
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManager.java
@@ -118,7 +118,7 @@ public final class DatabaseMetaDataManager {
         ShardingSphereDatabase database = metaData.getDatabase(databaseName);
         ShardingSphereSchema schema = database.getSchema(schemaName);
         // TODO @haoran
-        ShardingSphereSchema renamedSchema = new 
ShardingSphereSchema(renamedSchemaName, schema.getAllTables(), 
schema.getAllViews(), database.getProtocolType());
+        ShardingSphereSchema renamedSchema = new 
ShardingSphereSchema(renamedSchemaName, database.getProtocolType(), 
schema.getAllTables(), schema.getAllViews());
         database.addSchema(renamedSchema);
         database.dropSchema(schemaName);
         database.reloadRules();
diff --git 
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/resource/StorageUnitManager.java
 
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/resource/StorageUnitManager.java
index 484505181fd..a0ed7c25341 100644
--- 
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/resource/StorageUnitManager.java
+++ 
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/manager/resource/StorageUnitManager.java
@@ -122,8 +122,8 @@ public final class StorageUnitManager {
     }
     
     private ShardingSphereSchema buildSchema(final ShardingSphereDatabase 
originalDatabase, final ShardingSphereSchema schema) {
-        return new ShardingSphereSchema(schema.getName(), 
schema.getAllTables(), 
metaDataPersistFacade.getDatabaseMetaDataFacade().getView().load(originalDatabase.getName(),
 schema.getName()),
-                schema.getProtocolType());
+        return new ShardingSphereSchema(
+                schema.getName(), schema.getProtocolType(), 
schema.getAllTables(), 
metaDataPersistFacade.getDatabaseMetaDataFacade().getView().load(originalDatabase.getName(),
 schema.getName()));
     }
     
     @SneakyThrows(Exception.class)
diff --git 
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistService.java
 
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistService.java
index 1d9b931a764..daffef4c1d1 100644
--- 
a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistService.java
+++ 
b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistService.java
@@ -74,7 +74,7 @@ public final class SchemaMetaDataPersistService {
         if (schema.isEmpty()) {
             add(databaseName, schemaName);
         }
-        ShardingSphereSchema currentSchema = new 
ShardingSphereSchema(schemaName, tableMetaDataPersistService.load(databaseName, 
schemaName), Collections.emptyList(), schema.getProtocolType());
+        ShardingSphereSchema currentSchema = new 
ShardingSphereSchema(schemaName, schema.getProtocolType(), 
tableMetaDataPersistService.load(databaseName, schemaName), 
Collections.emptyList());
         tableMetaDataPersistService.persist(databaseName, schemaName, 
GenericSchemaManager.getToBeAddedTables(schema, currentSchema));
         GenericSchemaManager.getToBeDroppedTables(schema, 
currentSchema).forEach(each -> tableMetaDataPersistService.drop(databaseName, 
schemaName, each.getName()));
     }
@@ -88,8 +88,7 @@ public final class SchemaMetaDataPersistService {
      */
     public Collection<ShardingSphereSchema> load(final String databaseName, 
final DatabaseType protocolType) {
         return repository.getChildrenKeys(NodePathGenerator.toPath(new 
SchemaMetaDataNodePath(databaseName, null))).stream()
-                .map(each -> new ShardingSphereSchema(each, 
tableMetaDataPersistService.load(databaseName, each), 
viewMetaDataPersistService.load(databaseName, each),
-                        protocolType))
+                .map(each -> new ShardingSphereSchema(each, protocolType, 
tableMetaDataPersistService.load(databaseName, each), 
viewMetaDataPersistService.load(databaseName, each)))
                 .collect(Collectors.toList());
     }
 }
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
index 40f6646944d..ec1be69a73e 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
@@ -133,7 +133,7 @@ class ContextManagerTest {
         when(result.containsSchema("foo_schema")).thenReturn(true);
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(table), Collections.emptyList());
         when(result.getAllSchemas()).thenReturn(Collections.singleton(schema));
         StorageUnit storageUnit = mock(StorageUnit.class, RETURNS_DEEP_STUBS);
         when(storageUnit.getStorageType()).thenReturn(databaseType);
@@ -245,7 +245,7 @@ class ContextManagerTest {
         setPersistServiceFacade(persistServiceFacade);
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        ShardingSphereSchema reloadedSchema = new 
ShardingSphereSchema("foo_schema", Collections.singleton(table), 
Collections.emptyList(), mock(DatabaseType.class));
+        ShardingSphereSchema reloadedSchema = new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class), 
Collections.singleton(table), Collections.emptyList());
         try (MockedStatic<GenericSchemaBuilder> schemaBuilderMock = 
mockStatic(GenericSchemaBuilder.class)) {
             schemaBuilderMock.when(() -> 
GenericSchemaBuilder.build(any(DatabaseType.class), 
any(GenericSchemaBuilderMaterial.class)))
                     .thenReturn(Collections.singletonMap("foo_schema", 
reloadedSchema));
@@ -272,7 +272,7 @@ class ContextManagerTest {
         setPersistServiceFacade(persistServiceFacade);
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(table), Collections.emptyList());
         try (MockedStatic<GenericSchemaBuilder> schemaBuilderMock = 
mockStatic(GenericSchemaBuilder.class)) {
             schemaBuilderMock.when(() -> GenericSchemaBuilder.build(anySet(), 
any(DatabaseType.class), any(GenericSchemaBuilderMaterial.class)))
                     .thenReturn(Collections.singletonMap("foo_schema", 
schema));
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/MetaDataContextsFactoryTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/MetaDataContextsFactoryTest.java
index 4d8c0e06e1a..0e54d0d1cc9 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/MetaDataContextsFactoryTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/MetaDataContextsFactoryTest.java
@@ -278,6 +278,6 @@ class MetaDataContextsFactoryTest {
     private ShardingSphereSchema createSchemaWithTable(final String 
schemaName, final String tableName) {
         Collection<ShardingSphereColumn> columns = 
Collections.singletonList(new ShardingSphereColumn("id", 0, true, false, false, 
true, false, true));
         ShardingSphereTable table = new ShardingSphereTable(tableName, 
columns, Collections.emptyList(), Collections.emptyList());
-        return new ShardingSphereSchema(schemaName, 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        return new ShardingSphereSchema(schemaName, databaseType, 
Collections.singleton(table), Collections.emptyList());
     }
 }
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/LocalConfigurationMetaDataContextsInitFactoryTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/LocalConfigurationMetaDataContextsInitFactoryTest.java
index ebf21c1a26a..2348851c522 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/LocalConfigurationMetaDataContextsInitFactoryTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/LocalConfigurationMetaDataContextsInitFactoryTest.java
@@ -114,8 +114,8 @@ class LocalConfigurationMetaDataContextsInitFactoryTest {
     @Test
     void assertCreateWithPersistSchemasDisabled() throws SQLException {
         Map<String, DatabaseConfiguration> databaseConfigs = 
Collections.singletonMap("foo_db", mock(DatabaseConfiguration.class));
-        ShardingSphereSchema schema = new 
ShardingSphereSchema("non_empty_schema", Collections.singleton(new 
ShardingSphereTable("t_order",
-                Collections.emptyList(), Collections.emptyList(), 
Collections.emptyList())), Collections.emptyList(), mock(DatabaseType.class));
+        ShardingSphereSchema schema = new 
ShardingSphereSchema("non_empty_schema", mock(DatabaseType.class),
+                Collections.singleton(new ShardingSphereTable("t_order", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList());
         ShardingSphereDatabase database = createDatabase("foo_db", 
Collections.singleton(schema), Collections.emptyMap(), Collections.emptyList());
         ComputeNodeInstanceContext instanceContext = 
mock(ComputeNodeInstanceContext.class, RETURNS_DEEP_STUBS);
         when(ShardingSphereDatabasesFactory.create(eq(databaseConfigs), 
any(ConfigurationProperties.class), eq(instanceContext), 
any(DatabaseType.class)))
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/RegisterCenterMetaDataContextsInitFactoryTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/RegisterCenterMetaDataContextsInitFactoryTest.java
index a9aa7dff620..f4b7b598e99 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/RegisterCenterMetaDataContextsInitFactoryTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/factory/init/type/RegisterCenterMetaDataContextsInitFactoryTest.java
@@ -117,16 +117,15 @@ class RegisterCenterMetaDataContextsInitFactoryTest {
         when(GlobalRulesBuilder.buildRules(anyCollection(), anyCollection(), 
any(ConfigurationProperties.class))).thenReturn(Collections.emptyList());
         when(ShardingSphereStatisticsFactory.create(any(), 
any())).thenReturn(new ShardingSphereStatistics());
         ShardingSphereDatabase fooDatabase = createDatabase("foo_db",
-                Collections.singleton(new ShardingSphereSchema("foo_schema", 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("local_view", "select 1")),
-                        databaseType)));
+                Collections.singleton(new ShardingSphereSchema("foo_schema", 
databaseType, Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("local_view", "select 1")))));
         ShardingSphereDatabase barDatabase = createDatabase("bar_db", 
Collections.emptyList());
         ComputeNodeInstanceContext instanceContext = 
mockComputeNodeInstanceContext(mock(JDBCInstanceMetaData.class));
         when(ShardingSphereDatabasesFactory.create(anyMap(), 
any(ConfigurationProperties.class), eq(instanceContext), 
any(DatabaseType.class))).thenReturn(Arrays.asList(fooDatabase, barDatabase));
         Map<String, DatabaseConfiguration> databaseConfigs = 
createDatabaseConfigsWithoutStorageUnits();
         Properties props = PropertiesBuilder.build(new 
Property(ConfigurationPropertyKey.PERSIST_SCHEMAS_TO_REPOSITORY_ENABLED.getKey(),
 Boolean.FALSE.toString()));
         Collection<ShardingSphereSchema> persistedSchemas = Arrays.asList(
-                new ShardingSphereSchema("foo_schema", 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("persisted_view", "select 2")), databaseType),
-                new ShardingSphereSchema("missing_schema", 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("ignored_view", "select 3")), databaseType));
+                new ShardingSphereSchema("foo_schema", databaseType, 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("persisted_view", "select 2"))),
+                new ShardingSphereSchema("missing_schema", databaseType, 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("ignored_view", "select 3"))));
         try (
                 MockedConstruction<PropertiesPersistService> ignoredService = 
mockConstruction(PropertiesPersistService.class, (mock, context) -> 
when(mock.load()).thenReturn(props));
                 MockedConstruction<MetaDataPersistFacade> ignoredFacade = 
mockConstruction(MetaDataPersistFacade.class, 
withSettings().defaultAnswer(RETURNS_DEEP_STUBS),
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManagerTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManagerTest.java
index 0cf8ddc06e8..5ad39ddc87a 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManagerTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/database/DatabaseMetaDataManagerTest.java
@@ -251,6 +251,6 @@ class DatabaseMetaDataManagerTest {
     private ShardingSphereSchema createToBeAlteredSchema() {
         ShardingSphereTable beforeChangedTable = new 
ShardingSphereTable("foo_tbl", Collections.emptyList(), 
Collections.emptyList(), Collections.emptyList());
         ShardingSphereView beforeChangedView = new 
ShardingSphereView("foo_view", "");
-        return new ShardingSphereSchema("foo_schema", 
Collections.singleton(beforeChangedTable), 
Collections.singleton(beforeChangedView), mock(DatabaseType.class));
+        return new ShardingSphereSchema("foo_schema", 
mock(DatabaseType.class), Collections.singleton(beforeChangedTable), 
Collections.singleton(beforeChangedView));
     }
 }
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/statistics/StatisticsManagerTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/statistics/StatisticsManagerTest.java
index 35e366a63d9..425d968342a 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/statistics/StatisticsManagerTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/manager/statistics/StatisticsManagerTest.java
@@ -348,7 +348,7 @@ class StatisticsManagerTest {
         ShardingSphereTable table = new ShardingSphereTable(TABLE, 
Arrays.asList(
                 new ShardingSphereColumn("id", Types.INTEGER, true, false, 
false, true, false, false),
                 new ShardingSphereColumn("name", Types.VARCHAR, false, false, 
false, true, false, true)), Collections.emptyList(), Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema(SCHEMA, 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema(SCHEMA, 
databaseType, Collections.singleton(table), Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 DATABASE, databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         return new ShardingSphereMetaData(
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/DatabaseMetaDataPersistFacadeTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/DatabaseMetaDataPersistFacadeTest.java
index db00aff88be..636405745a6 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/DatabaseMetaDataPersistFacadeTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/DatabaseMetaDataPersistFacadeTest.java
@@ -137,8 +137,7 @@ class DatabaseMetaDataPersistFacadeTest {
         ShardingSphereTable table = new ShardingSphereTable("foo_table",
                 Collections.singleton(new ShardingSphereColumn("foo_column", 
0, false, false, false, true, false, true)),
                 Collections.emptyList(), Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
Collections.singleton(table), Collections.singleton(new 
ShardingSphereView("foo_view", "select 1")),
-                databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(table), Collections.singleton(new 
ShardingSphereView("foo_view", "select 1")));
         ShardingSphereDatabase database = createDatabase("foo_db", 
Collections.singleton(schema));
         databaseMetaDataFacade.renameSchema(createMetaData(database), 
database, "foo_schema", "bar_schema");
         verify(tableMetaDataService).persist("foo_db", "bar_schema", 
schema.getAllTables());
@@ -215,8 +214,8 @@ class DatabaseMetaDataPersistFacadeTest {
     @Test
     void assertPersistCreatedDatabaseSchemas() {
         ShardingSphereSchema emptySchema = new 
ShardingSphereSchema("foo_empty", mock(DatabaseType.class));
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema",
-                Collections.singleton(new ShardingSphereTable("foo_table", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType,
+                Collections.singleton(new ShardingSphereTable("foo_table", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList());
         
databaseMetaDataFacade.persistCreatedDatabaseSchemas(createDatabase("foo_db", 
Arrays.asList(emptySchema, schema)));
         verify(schemaMetaDataService).add("foo_db", "foo_empty");
         verify(tableMetaDataService).persist("foo_db", "foo_schema", 
schema.getAllTables());
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistServiceTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistServiceTest.java
index dcb6b7c6222..fdbddae3aa3 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistServiceTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/metadata/service/SchemaMetaDataPersistServiceTest.java
@@ -80,7 +80,7 @@ class SchemaMetaDataPersistServiceTest {
     void assertAlterByRefreshWithTables() {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         when(table.getName()).thenReturn("foo_tbl");
-        persistService.alterByRefresh("foo_db", new 
ShardingSphereSchema("foo_schema", Collections.singleton(table), 
Collections.emptyList(), mock(DatabaseType.class)));
+        persistService.alterByRefresh("foo_db", new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class), 
Collections.singleton(table), Collections.emptyList()));
         verify(repository, 
never()).persist("/metadata/foo_db/schemas/foo_schema/tables", "");
         verify(tableMetaDataPersistService).persist("foo_db", "foo_schema", 
Collections.singletonList(table));
     }
@@ -89,7 +89,7 @@ class SchemaMetaDataPersistServiceTest {
     void assertAlterByRefreshWithViews() {
         ShardingSphereView view = mock(ShardingSphereView.class);
         when(view.getName()).thenReturn("foo_view");
-        persistService.alterByRefresh("foo_db", new 
ShardingSphereSchema("foo_schema", Collections.emptyList(), 
Collections.singleton(view), mock(DatabaseType.class)));
+        persistService.alterByRefresh("foo_db", new 
ShardingSphereSchema("foo_schema", mock(DatabaseType.class), 
Collections.emptyList(), Collections.singleton(view)));
         verify(repository, 
never()).persist("/metadata/foo_db/schemas/foo_schema/tables", "");
         verify(tableMetaDataPersistService).persist("foo_db", "foo_schema", 
Collections.emptyList());
     }
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/federation/type/AlterViewFederationMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/federation/type/AlterViewFederationMetaDataRefresherTest.java
index eb6e7c061d9..f299ceb484c 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/federation/type/AlterViewFederationMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/federation/type/AlterViewFederationMetaDataRefresherTest.java
@@ -72,8 +72,7 @@ class AlterViewFederationMetaDataRefresherTest {
     @SuppressWarnings("unchecked")
     @Test
     void assertRefreshWithRenameView() {
-        ShardingSphereSchema schema = new ShardingSphereSchema(schemaName, 
Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("foo_view", "SELECT * FROM foo_tbl")),
-                databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema(schemaName, 
databaseType, Collections.emptyList(), Collections.singleton(new 
ShardingSphereView("foo_view", "SELECT * FROM foo_tbl")));
         when(database.getSchema(schemaName)).thenReturn(schema);
         sqlStatement.setView(new SimpleTableSegment(new TableNameSegment(0, 0, 
new IdentifierValue("foo_view"))));
         sqlStatement.setRenameView(new SimpleTableSegment(new 
TableNameSegment(0, 0, new IdentifierValue("bar_view"))));
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/AlterIndexPushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/AlterIndexPushDownMetaDataRefresherTest.java
index 1c23a67e56a..101de804bc6 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/AlterIndexPushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/AlterIndexPushDownMetaDataRefresherTest.java
@@ -82,7 +82,7 @@ class AlterIndexPushDownMetaDataRefresherTest {
     void assertRefreshRenameIndex() {
         ShardingSphereTable table = new ShardingSphereTable(
                 "foo_tbl", Collections.emptyList(), Collections.singleton(new 
ShardingSphereIndex("idx_old", Collections.emptyList(), false)), 
Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("bar_schema", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("bar_schema", 
databaseType, Collections.singleton(table), Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         AlterIndexStatement sqlStatement = createAlterStatement();
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/CreateIndexPushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/CreateIndexPushDownMetaDataRefresherTest.java
index 7779cfe2929..ba01e475f1b 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/CreateIndexPushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/CreateIndexPushDownMetaDataRefresherTest.java
@@ -66,9 +66,8 @@ class CreateIndexPushDownMetaDataRefresherTest {
     @SuppressWarnings("unchecked")
     @Test
     void assertRefreshCreateIndex() {
-        ShardingSphereSchema schema = new ShardingSphereSchema(
-                "foo_schema", Collections.singleton(new 
ShardingSphereTable("foo_tbl", Collections.emptyList(), 
Collections.emptyList(), Collections.emptyList())), Collections.emptyList(),
-                databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType,
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList());
         ShardingSphereDatabase database = 
createDatabase(Collections.singleton(schema));
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, createCreateIndexStatement(), new 
ConfigurationProperties(new Properties()));
         ArgumentCaptor<Collection<ShardingSphereTable>> alteredTablesCaptor = 
ArgumentCaptor.forClass(Collection.class);
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/DropIndexPushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/DropIndexPushDownMetaDataRefresherTest.java
index 4b0a833edfd..a468adfcf57 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/DropIndexPushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/index/DropIndexPushDownMetaDataRefresherTest.java
@@ -66,8 +66,8 @@ class DropIndexPushDownMetaDataRefresherTest {
     
     @Test
     void assertRefreshSkipWhenLogicTableNotFound() {
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db",
-                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType,
+                Collections.singleton(new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList())), 
Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         DropIndexStatement sqlStatement = new DropIndexStatement(databaseType);
@@ -94,7 +94,7 @@ class DropIndexPushDownMetaDataRefresherTest {
     void assertRefreshWithoutSimpleTableResolvesByMetaData() {
         ShardingSphereTable table = new ShardingSphereTable(
                 "foo_tbl", Collections.emptyList(), Collections.singleton(new 
ShardingSphereIndex("idx_foo", Collections.emptyList(), false)), 
Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         DropIndexStatement sqlStatement = new DropIndexStatement(databaseType);
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/AlterTablePushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/AlterTablePushDownMetaDataRefresherTest.java
index ca568998a99..4368b680d7a 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/AlterTablePushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/AlterTablePushDownMetaDataRefresherTest.java
@@ -83,8 +83,8 @@ class AlterTablePushDownMetaDataRefresherTest {
         
when(TableRefreshUtils.getTableName(sqlStatement.getTable().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_tbl");
         when(TableRefreshUtils.isSingleTable(any(), any())).thenReturn(true);
         ShardingSphereTable renamedTable = new ShardingSphereTable("bar_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(renamedTable), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema",
+                new ShardingSphereSchema("foo_schema", databaseType, 
Collections.singleton(renamedTable), Collections.emptyList()));
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.singleton(rule)), Collections.emptyList());
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("bar_tbl")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
@@ -109,8 +109,8 @@ class AlterTablePushDownMetaDataRefresherTest {
         
when(TableRefreshUtils.getTableName(sqlStatement.getTable().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_tbl");
         when(TableRefreshUtils.isSingleTable("foo_tbl", 
database)).thenReturn(false);
         ShardingSphereTable table = new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(table), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(table), Collections.emptyList()));
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("foo_tbl")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, sqlStatement, new ConfigurationProperties(new 
Properties()));
         ArgumentCaptor<Collection<ShardingSphereTable>> alteredTablesCaptor = 
ArgumentCaptor.forClass(Collection.class);
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/CreateTablePushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/CreateTablePushDownMetaDataRefresherTest.java
index 071250617e8..a1df103f303 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/CreateTablePushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/CreateTablePushDownMetaDataRefresherTest.java
@@ -42,6 +42,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 
+import java.sql.SQLException;
 import java.util.Collections;
 import java.util.Map;
 import java.util.Properties;
@@ -68,7 +69,7 @@ class CreateTablePushDownMetaDataRefresherTest {
     private MutableDataNodeRuleAttribute mutableDataNodeRuleAttribute;
     
     @Test
-    void assertRefreshCreatesTableAndPutsSingleTableMapping() throws Exception 
{
+    void assertRefreshCreatesTableAndPutsSingleTableMapping() throws 
SQLException {
         ShardingSphereRule rule = mock(ShardingSphereRule.class);
         when(rule.getAttributes()).thenReturn(new 
RuleAttributes(mutableDataNodeRuleAttribute));
         ShardingSphereDatabase database = new ShardingSphereDatabase(
@@ -78,8 +79,8 @@ class CreateTablePushDownMetaDataRefresherTest {
         
when(TableRefreshUtils.getTableName(sqlStatement.getTable().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_tbl");
         when(TableRefreshUtils.isSingleTable("foo_tbl", 
database)).thenReturn(true);
         ShardingSphereTable loadedTable = new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(loadedTable), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(loadedTable), Collections.emptyList()));
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("foo_tbl")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, sqlStatement, new ConfigurationProperties(new 
Properties()));
         verify(mutableDataNodeRuleAttribute).put("logic_ds", "foo_schema", 
"foo_tbl");
@@ -87,10 +88,10 @@ class CreateTablePushDownMetaDataRefresherTest {
     }
     
     @Test
-    void assertRefreshCreatesTableWithoutSingleTableMapping() throws Exception 
{
+    void assertRefreshCreatesTableWithoutSingleTableMapping() throws 
SQLException {
         ShardingSphereTable loadedTable = new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(loadedTable), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(loadedTable), Collections.emptyList()));
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.emptyList());
         CreateTableStatement sqlStatement = new 
CreateTableStatement(databaseType);
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/RenameTablePushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/RenameTablePushDownMetaDataRefresherTest.java
index 2cd8d351efe..ac288f8e53b 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/RenameTablePushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/RenameTablePushDownMetaDataRefresherTest.java
@@ -61,7 +61,7 @@ class RenameTablePushDownMetaDataRefresherTest {
     @Test
     void assertRefreshRenamesTables() {
         ShardingSphereTable table = new ShardingSphereTable("foo_tbl", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(table), Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         RenameTableDefinitionSegment renameDef = new 
RenameTableDefinitionSegment(0, 0);
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/AlterViewPushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/AlterViewPushDownMetaDataRefresherTest.java
index 676c854b829..9cb8fa9d401 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/AlterViewPushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/AlterViewPushDownMetaDataRefresherTest.java
@@ -88,11 +88,11 @@ class AlterViewPushDownMetaDataRefresherTest {
         
when(TableRefreshUtils.getTableName(sqlStatement.getView().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_view");
         ShardingSphereView existingView = new ShardingSphereView("foo_view", 
"SELECT 1");
         ShardingSphereDatabase database = new ShardingSphereDatabase("foo_db", 
databaseType, new ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.singleton(rule)),
-                Collections.singleton(new ShardingSphereSchema("foo_schema", 
Collections.emptyList(), Collections.singleton(existingView), databaseType)));
+                Collections.singleton(new ShardingSphereSchema("foo_schema", 
databaseType, Collections.emptyList(), Collections.singleton(existingView))));
         when(TableRefreshUtils.isSingleTable("bar_view", 
database)).thenReturn(true);
         ShardingSphereTable renamedTable = new ShardingSphereTable("bar_view", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(renamedTable), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(renamedTable), Collections.emptyList()));
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("bar_view")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, sqlStatement, new ConfigurationProperties(new 
Properties()));
         ArgumentCaptor<Collection<ShardingSphereTable>> alteredCaptor = 
ArgumentCaptor.forClass(Collection.class);
@@ -114,10 +114,10 @@ class AlterViewPushDownMetaDataRefresherTest {
         sqlStatement.setViewDefinition("SELECT * FROM t_order");
         
when(TableRefreshUtils.getTableName(sqlStatement.getView().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_view");
         ShardingSphereDatabase database = new ShardingSphereDatabase("foo_db", 
databaseType, new ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.singleton(rule)),
-                Collections.singleton(new ShardingSphereSchema("foo_schema", 
Collections.emptyList(), Collections.emptyList(), databaseType)));
+                Collections.singleton(new ShardingSphereSchema("foo_schema", 
databaseType, Collections.emptyList(), Collections.emptyList())));
         ShardingSphereTable table = new ShardingSphereTable("foo_view", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(table), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(table), Collections.emptyList()));
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("foo_view")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, sqlStatement, new ConfigurationProperties(new 
Properties()));
         ArgumentCaptor<Collection<ShardingSphereTable>> alteredCaptor = 
ArgumentCaptor.forClass(Collection.class);
diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/CreateViewPushDownMetaDataRefresherTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/CreateViewPushDownMetaDataRefresherTest.java
index b9e88470f93..bbafba07440 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/CreateViewPushDownMetaDataRefresherTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/CreateViewPushDownMetaDataRefresherTest.java
@@ -82,8 +82,8 @@ class CreateViewPushDownMetaDataRefresherTest {
         
when(TableRefreshUtils.getTableName(sqlStatement.getView().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_view");
         when(TableRefreshUtils.isSingleTable("foo_view", 
database)).thenReturn(true);
         ShardingSphereTable loadedTable = new ShardingSphereTable("foo_view", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(loadedTable), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(loadedTable), Collections.emptyList()));
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("foo_view")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, sqlStatement, new ConfigurationProperties(new 
Properties()));
         verify(mutableDataNodeRuleAttribute).put("logic_ds", "foo_schema", 
"foo_view");
@@ -100,8 +100,8 @@ class CreateViewPushDownMetaDataRefresherTest {
         sqlStatement.setView(new SimpleTableSegment(new TableNameSegment(0, 0, 
new IdentifierValue("foo_view"))));
         
when(TableRefreshUtils.getTableName(sqlStatement.getView().getTableName().getIdentifier(),
 databaseType)).thenReturn("foo_view");
         ShardingSphereTable loadedTable = new ShardingSphereTable("foo_view", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
-        Map<String, ShardingSphereSchema> schemas = 
Collections.singletonMap("foo_schema", new ShardingSphereSchema("foo_schema", 
Collections.singleton(loadedTable), Collections.emptyList(),
-                databaseType));
+        Map<String, ShardingSphereSchema> schemas = Collections.singletonMap(
+                "foo_schema", new ShardingSphereSchema("foo_schema", 
databaseType, Collections.singleton(loadedTable), Collections.emptyList()));
         
when(GenericSchemaBuilder.build(eq(Collections.singletonList("foo_view")), 
eq(database.getProtocolType()), any())).thenReturn(schemas);
         refresher.refresh(metaDataManagerPersistService, database, "logic_ds", 
"foo_schema", databaseType, sqlStatement, new ConfigurationProperties(new 
Properties()));
         verify(mutableDataNodeRuleAttribute, never()).put("logic_ds", 
"foo_schema", "foo_view");
diff --git 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/DistSQLQueryProxyBackendHandlerTest.java
 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/DistSQLQueryProxyBackendHandlerTest.java
index ed5282c76a2..c26b5d9ac57 100644
--- 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/DistSQLQueryProxyBackendHandlerTest.java
+++ 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/DistSQLQueryProxyBackendHandlerTest.java
@@ -103,7 +103,7 @@ class DistSQLQueryProxyBackendHandlerTest {
     @Test
     void assertExecute() {
         ShardingSphereDatabase database = new ShardingSphereDatabase(
-                "foo_db", databaseType, mock(), mock(), 
Collections.singleton(new ShardingSphereSchema("foo_db", createTables(), 
Collections.emptyList(), databaseType)));
+                "foo_db", databaseType, mock(), mock(), 
Collections.singleton(new ShardingSphereSchema("foo_db", databaseType, 
createTables(), Collections.emptyList())));
         ContextManager contextManager = mock(ContextManager.class);
         when(contextManager.getDatabase("foo_db")).thenReturn(database);
         assertDoesNotThrow(() -> new 
DistSQLQueryProxyBackendHandler(createSqlStatement(), mock(), 
mock(ConnectionSession.class, RETURNS_DEEP_STUBS), contextManager).execute());
diff --git 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/export/ShowTableMetaDataExecutorTest.java
 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/export/ShowTableMetaDataExecutorTest.java
index 2bf1b67ac74..eda91af0be8 100644
--- 
a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/export/ShowTableMetaDataExecutorTest.java
+++ 
b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/export/ShowTableMetaDataExecutorTest.java
@@ -74,7 +74,7 @@ class ShowTableMetaDataExecutorTest {
         ShardingSphereDatabase result = mock(ShardingSphereDatabase.class, 
RETURNS_DEEP_STUBS);
         
when(result.getProtocolType()).thenReturn(TypedSPILoader.getService(DatabaseType.class,
 "FIXTURE"));
         when(result.getName()).thenReturn("foo_db");
-        when(result.getSchema("foo_db")).thenReturn(new 
ShardingSphereSchema("foo_db", createTables(), Collections.emptyList(), 
mock(DatabaseType.class)));
+        when(result.getSchema("foo_db")).thenReturn(new 
ShardingSphereSchema("foo_db", mock(DatabaseType.class), createTables(), 
Collections.emptyList()));
         return result;
     }
     
diff --git 
a/proxy/backend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/show/MySQLShowTablesExecutorTest.java
 
b/proxy/backend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/show/MySQLShowTablesExecutorTest.java
index 3d62649b3e9..37571f097e3 100644
--- 
a/proxy/backend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/show/MySQLShowTablesExecutorTest.java
+++ 
b/proxy/backend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/show/MySQLShowTablesExecutorTest.java
@@ -167,7 +167,7 @@ class MySQLShowTablesExecutorTest {
         tables.add(new ShardingSphereTable("t_account_bak", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList()));
         tables.add(new ShardingSphereTable("t_account_detail", 
Collections.emptyList(), Collections.emptyList(), Collections.emptyList()));
         tables.add(new ShardingSphereTable("T_TEST", Collections.emptyList(), 
Collections.emptyList(), Collections.emptyList()));
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
tables, Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, tables, Collections.emptyList());
         ShardingSphereDatabase database = mock(ShardingSphereDatabase.class, 
RETURNS_DEEP_STUBS);
         when(database.getName()).thenReturn(String.format(DATABASE_PATTERN, 
0));
         when(database.getProtocolType()).thenReturn(databaseType);
diff --git 
a/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/prepare/FirebirdPrepareStatementCommandExecutorTest.java
 
b/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/prepare/FirebirdPrepareStatementCommandExecutorTest.java
index ffd26619263..8dc9305bb2d 100644
--- 
a/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/prepare/FirebirdPrepareStatementCommandExecutorTest.java
+++ 
b/proxy/frontend/dialect/firebird/src/test/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/prepare/FirebirdPrepareStatementCommandExecutorTest.java
@@ -105,7 +105,7 @@ class FirebirdPrepareStatementCommandExecutorTest {
         RuleMetaData globalRuleMetaData = new 
RuleMetaData(Collections.singleton(parserRule));
         ShardingSphereColumn column = new ShardingSphereColumn("id", 
Types.INTEGER, false, false, true, true, false, true);
         ShardingSphereTable table = new ShardingSphereTable("foo_tbl", 
Collections.singleton(column), Collections.emptyList(), 
Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         ShardingSphereDatabase database = new ShardingSphereDatabase(
                 "foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
         ShardingSphereMetaData metaData = new ShardingSphereMetaData(
diff --git 
a/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
 
b/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
index acaf2e52232..1641258712a 100644
--- 
a/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
+++ 
b/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
@@ -239,7 +239,7 @@ class MySQLComStmtPrepareExecutorTest {
         ShardingSphereTable table = new ShardingSphereTable("user", 
Arrays.asList(new ShardingSphereColumn("id", Types.BIGINT, true, false, false, 
false, true, false),
                 new ShardingSphereColumn("name", Types.VARCHAR, false, false, 
false, false, false, false),
                 new ShardingSphereColumn("age", Types.SMALLINT, false, false, 
false, false, true, false)), Collections.emptyList(), Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         return new ShardingSphereDatabase("foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
     }
 }
diff --git 
a/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractorTest.java
 
b/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractorTest.java
index 657cef6a85b..b255544cff1 100644
--- 
a/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractorTest.java
+++ 
b/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractorTest.java
@@ -56,6 +56,6 @@ class MySQLComStmtPrepareParameterMarkerExtractorTest {
                 new ShardingSphereColumn("id", Types.BIGINT, true, false, 
false, false, true, false),
                 new ShardingSphereColumn("name", Types.VARCHAR, false, false, 
false, false, false, false),
                 new ShardingSphereColumn("age", Types.SMALLINT, false, false, 
false, false, true, false)), Collections.emptyList(), Collections.emptyList());
-        return new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        return new ShardingSphereSchema("foo_db", databaseType, 
Collections.singleton(table), Collections.emptyList());
     }
 }
diff --git 
a/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
 
b/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
index 71e89ef24f2..275901a552b 100644
--- 
a/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
+++ 
b/proxy/frontend/dialect/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
@@ -177,7 +177,7 @@ class MySQLComQueryPacketExecutorTest {
     private ShardingSphereDatabase createDatabase() {
         ShardingSphereTable table = new ShardingSphereTable("t", 
Arrays.asList(new ShardingSphereColumn("id", Types.BIGINT, true, false, false, 
false, true, false),
                 new ShardingSphereColumn("v", Types.INTEGER, false, false, 
false, false, true, false)), Collections.emptyList(), Collections.emptyList());
-        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
Collections.singleton(table), Collections.emptyList(), databaseType);
+        ShardingSphereSchema schema = new ShardingSphereSchema("foo_db", 
databaseType, Collections.singleton(table), Collections.emptyList());
         return new ShardingSphereDatabase("foo_db", databaseType, new 
ResourceMetaData(Collections.emptyMap()), new 
RuleMetaData(Collections.emptyList()), Collections.singleton(schema));
     }
     
diff --git 
a/proxy/frontend/dialect/opengauss/src/test/java/org/apache/shardingsphere/sql/parser/engine/opengauss/OpenGaussSQLParserEngineTest.java
 
b/proxy/frontend/dialect/opengauss/src/test/java/org/apache/shardingsphere/sql/parser/engine/opengauss/OpenGaussSQLParserEngineTest.java
index b3d7b6ba551..97d68ed8af9 100644
--- 
a/proxy/frontend/dialect/opengauss/src/test/java/org/apache/shardingsphere/sql/parser/engine/opengauss/OpenGaussSQLParserEngineTest.java
+++ 
b/proxy/frontend/dialect/opengauss/src/test/java/org/apache/shardingsphere/sql/parser/engine/opengauss/OpenGaussSQLParserEngineTest.java
@@ -77,7 +77,7 @@ class OpenGaussSQLParserEngineTest {
     private ShardingSphereMetaData mockMetaData() {
         ShardingSphereColumn userIdColumn = new 
ShardingSphereColumn("user_id", 0, false, false, false, true, false, false);
         ShardingSphereTable orderTable = new ShardingSphereTable("t_order", 
Collections.singletonList(userIdColumn), Collections.emptyList(), 
Collections.emptyList());
-        ShardingSphereSchema testSchema = new ShardingSphereSchema("test", 
Collections.singleton(orderTable), Collections.emptyList(), databaseType);
+        ShardingSphereSchema testSchema = new ShardingSphereSchema("test", 
databaseType, Collections.singleton(orderTable), Collections.emptyList());
         ShardingSphereDatabase database = mock(ShardingSphereDatabase.class, 
RETURNS_DEEP_STUBS);
         when(database.getName()).thenReturn("logic_db");
         when(database.containsSchema("test")).thenReturn(true);
diff --git 
a/proxy/frontend/dialect/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
 
b/proxy/frontend/dialect/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
index d3473f8a22c..b8bf76b0499 100644
--- 
a/proxy/frontend/dialect/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
+++ 
b/proxy/frontend/dialect/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
@@ -205,6 +205,6 @@ class PostgreSQLComParseExecutorTest {
                 new ShardingSphereColumn("k", Types.VARCHAR, false, false, 
false, false, false, false),
                 new ShardingSphereColumn("c", Types.VARCHAR, false, false, 
false, false, true, false),
                 new ShardingSphereColumn("pad", Types.VARCHAR, false, false, 
false, false, true, false)), Collections.emptyList(), Collections.emptyList());
-        return new ShardingSphereSchema("public", Arrays.asList(testTable, 
sbTestTable), Collections.emptyList(), databaseType);
+        return new ShardingSphereSchema("public", databaseType, 
Arrays.asList(testTable, sbTestTable), Collections.emptyList());
     }
 }
diff --git 
a/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/HavingCorrelatedSubqueryBinderIT.java
 
b/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/HavingCorrelatedSubqueryBinderIT.java
index 767acff564b..a9a2a8d9ba1 100644
--- 
a/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/HavingCorrelatedSubqueryBinderIT.java
+++ 
b/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/HavingCorrelatedSubqueryBinderIT.java
@@ -96,7 +96,7 @@ class HavingCorrelatedSubqueryBinderIT {
     private Collection<ShardingSphereSchema> mockSchemas(final DatabaseType 
databaseType) {
         Collection<ShardingSphereSchema> result = new LinkedList<>();
         String defaultSchemaName = new 
DatabaseTypeRegistry(databaseType).getDefaultSchemaName("foo_db");
-        result.add(new ShardingSphereSchema(defaultSchemaName, mockTables(), 
Collections.emptyList(), databaseType));
+        result.add(new ShardingSphereSchema(defaultSchemaName, databaseType, 
mockTables(), Collections.emptyList()));
         return result;
     }
     
diff --git 
a/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
 
b/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
index 445ba2954d5..7c6516bae24 100644
--- 
a/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
+++ 
b/test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/SQLBinderIT.java
@@ -98,7 +98,7 @@ public abstract class SQLBinderIT {
         Collection<ShardingSphereSchema> result = new LinkedList<>();
         String defaultSchemaName = new 
DatabaseTypeRegistry(databaseType).getDefaultSchemaName(databaseName);
         Collection<ShardingSphereTable> tables = 
"foo_db_1".equalsIgnoreCase(databaseName) ? mockFooDB1Tables() : 
mockFooDB2Tables();
-        result.add(new ShardingSphereSchema(defaultSchemaName, tables, 
Collections.emptyList(), databaseType));
+        result.add(new ShardingSphereSchema(defaultSchemaName, databaseType, 
tables, Collections.emptyList()));
         return result;
     }
     
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/EncryptSQLRewriterIT.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/EncryptSQLRewriterIT.java
index 3266f87a9f8..ed16f622d50 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/EncryptSQLRewriterIT.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/EncryptSQLRewriterIT.java
@@ -73,7 +73,7 @@ class EncryptSQLRewriterIT extends SQLRewriterIT {
                 new ShardingSphereColumn("email", Types.VARCHAR, false, false, 
false, true, false, false),
                 new ShardingSphereColumn("telephone", Types.VARCHAR, false, 
false, false, true, false, false),
                 new ShardingSphereColumn("creation_date", Types.DATE, false, 
false, false, true, false, false)), Collections.emptyList(), 
Collections.emptyList()));
-        return Collections.singleton(new ShardingSphereSchema(schemaName, 
tables, Collections.emptyList(), mock(DatabaseType.class)));
+        return Collections.singleton(new ShardingSphereSchema(schemaName, 
mock(DatabaseType.class), tables, Collections.emptyList()));
     }
     
     @Override
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/MixSQLRewriterIT.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/MixSQLRewriterIT.java
index b5d2c04ed55..887dc8340f3 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/MixSQLRewriterIT.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/MixSQLRewriterIT.java
@@ -57,7 +57,7 @@ class MixSQLRewriterIT extends SQLRewriterIT {
                 new ShardingSphereColumn("password", Types.VARCHAR, false, 
false, false, true, false, false),
                 new ShardingSphereColumn("amount", Types.DECIMAL, false, 
false, false, true, false, false),
                 new ShardingSphereColumn("status", Types.TINYINT, false, 
false, false, false, false, false)), Collections.emptyList(), 
Collections.emptyList()));
-        return Collections.singleton(new ShardingSphereSchema(schemaName, 
tables, Collections.emptyList(), mock(DatabaseType.class)));
+        return Collections.singleton(new ShardingSphereSchema(schemaName, 
mock(DatabaseType.class), tables, Collections.emptyList()));
     }
     
     @Override
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/ShardingSQLRewriterIT.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/ShardingSQLRewriterIT.java
index f732bd3cef9..cbdf0721790 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/ShardingSQLRewriterIT.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewriter/engine/scenario/ShardingSQLRewriterIT.java
@@ -99,7 +99,7 @@ class ShardingSQLRewriterIT extends SQLRewriterIT {
         tables.add(new ShardingSphereTable("t_order_type", Arrays.asList(
                 new ShardingSphereColumn("type_id", Types.INTEGER, true, 
false, false, true, false, false),
                 new ShardingSphereColumn("type_name", Types.VARCHAR, false, 
false, false, true, false, false)), Collections.emptyList(), 
Collections.emptyList()));
-        return Collections.singleton(new ShardingSphereSchema(schemaName, 
tables, Collections.emptyList(), mock(DatabaseType.class)));
+        return Collections.singleton(new ShardingSphereSchema(schemaName, 
mock(DatabaseType.class), tables, Collections.emptyList()));
     }
     
     @Override

Reply via email to