diff --git a/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java b/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java
index 01e7f71e245bb..25f11f9614ad2 100644
--- a/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java
+++ b/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java
@@ -22,7 +22,7 @@
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricCollectorType;
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricConfiguration;
import org.apache.shardingsphere.agent.plugin.metrics.core.fixture.collector.MetricsCollectorFixture;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
diff --git a/agent/plugins/tracing/type/opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/OpenTelemetryJDBCExecutorCallbackAdviceTest.java b/agent/plugins/tracing/type/opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/OpenTelemetryJDBCExecutorCallbackAdviceTest.java
index a02b02e84b456..3e8578a169c81 100644
--- a/agent/plugins/tracing/type/opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/OpenTelemetryJDBCExecutorCallbackAdviceTest.java
+++ b/agent/plugins/tracing/type/opentelemetry/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice/OpenTelemetryJDBCExecutorCallbackAdviceTest.java
@@ -34,7 +34,7 @@
import org.apache.shardingsphere.agent.plugin.tracing.opentelemetry.constant.OpenTelemetryConstants;
import org.apache.shardingsphere.agent.plugin.tracing.opentelemetry.fixture.JDBCExecutorCallbackFixture;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.context.SQLUnit;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit;
diff --git a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/DecoratedEncryptShowCreateTableMergedResultTest.java b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/DecoratedEncryptShowCreateTableMergedResultTest.java
index 9231e005f5d2c..959b477f700cf 100644
--- a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/DecoratedEncryptShowCreateTableMergedResultTest.java
+++ b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/DecoratedEncryptShowCreateTableMergedResultTest.java
@@ -23,7 +23,7 @@
import org.apache.shardingsphere.encrypt.rule.EncryptRule;
import org.apache.shardingsphere.encrypt.rule.EncryptTable;
import org.apache.shardingsphere.infra.binder.statement.dal.ShowCreateTableStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
diff --git a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/MergedEncryptShowCreateTableMergedResultTest.java b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/MergedEncryptShowCreateTableMergedResultTest.java
index 5f2b037c852a7..3c74d5928e205 100644
--- a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/MergedEncryptShowCreateTableMergedResultTest.java
+++ b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/merge/dal/show/MergedEncryptShowCreateTableMergedResultTest.java
@@ -23,7 +23,7 @@
import org.apache.shardingsphere.encrypt.rule.EncryptRule;
import org.apache.shardingsphere.encrypt.rule.EncryptTable;
import org.apache.shardingsphere.infra.binder.statement.dal.ShowCreateTableStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.result.query.QueryResult;
import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java
index ee530147e4e8f..d29790c302516 100644
--- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java
+++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/metadata/data/ShardingStatisticsTableCollector.java
@@ -18,9 +18,9 @@
package org.apache.shardingsphere.sharding.metadata.data;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
index a644e8d198cf4..c073cbc2af1f1 100644
--- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
+++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
@@ -26,7 +26,7 @@
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OracleDatabaseType;
+import org.apache.shardingsphere.infra.database.oracle.OracleDatabaseType;
import org.apache.shardingsphere.infra.rewrite.sql.token.generator.OptionalSQLTokenGenerator;
import org.apache.shardingsphere.infra.rewrite.sql.token.generator.aware.RouteContextAware;
import org.apache.shardingsphere.infra.route.context.RouteContext;
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/decider/ShardingSQLFederationDeciderTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/decider/ShardingSQLFederationDeciderTest.java
index 56320808c6dec..38a0443c1dbeb 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/decider/ShardingSQLFederationDeciderTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/decider/ShardingSQLFederationDeciderTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dal/ShardingDALResultMergerTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dal/ShardingDALResultMergerTest.java
index 2722c318fbcec..6746e953dd055 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dal/ShardingDALResultMergerTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/dal/ShardingDALResultMergerTest.java
@@ -21,7 +21,7 @@
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.session.connection.ConnectionContext;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.result.query.QueryResult;
import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataMergedResult;
import org.apache.shardingsphere.infra.merge.result.impl.transparent.TransparentMergedResult;
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/IndexTokenGeneratorTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/IndexTokenGeneratorTest.java
index cf70decdec0cc..cb782fbea3d18 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/IndexTokenGeneratorTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/IndexTokenGeneratorTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.binder.statement.ddl.AlterIndexStatementContext;
import org.apache.shardingsphere.infra.binder.statement.ddl.CreateDatabaseStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import org.apache.shardingsphere.infra.rewrite.sql.token.pojo.SQLToken;
import org.apache.shardingsphere.sharding.rewrite.token.generator.impl.IndexTokenGenerator;
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java
index 62d362c1bf4c5..66e471b5d2594 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngineTest.java
@@ -23,7 +23,7 @@
import org.apache.shardingsphere.infra.binder.segment.insert.values.InsertValueContext;
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import org.apache.shardingsphere.sharding.route.engine.condition.ShardingCondition;
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/broadcast/ShardingTableBroadcastRoutingEngineTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/broadcast/ShardingTableBroadcastRoutingEngineTest.java
index 3b4cec784b503..d0c7e532eb85b 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/broadcast/ShardingTableBroadcastRoutingEngineTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/broadcast/ShardingTableBroadcastRoutingEngineTest.java
@@ -21,7 +21,7 @@
import org.apache.shardingsphere.infra.binder.statement.ddl.DropIndexStatementContext;
import org.apache.shardingsphere.infra.binder.type.IndexAvailable;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.instance.InstanceContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
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 c8273faa6e83f..488e3f1484bfe 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
@@ -26,7 +26,7 @@
import org.apache.shardingsphere.infra.session.connection.ConnectionContext;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
index c388f6962e196..aeb0a6b66483e 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
@@ -24,7 +24,7 @@
import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.instance.InstanceContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
index 91d7e37d0dff8..956a21dff07d3 100644
--- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
+++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/engine/ProjectionEngine.java
@@ -30,7 +30,7 @@
import org.apache.shardingsphere.infra.binder.segment.select.projection.impl.SubqueryProjection;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.database.DatabaseTypeEngine;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.exception.SchemaNotFoundException;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/SubqueryProjection.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/SubqueryProjection.java
index 725a889eb4fa4..c21aac17c1150 100644
--- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/SubqueryProjection.java
+++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/select/projection/impl/SubqueryProjection.java
@@ -24,7 +24,7 @@
import lombok.ToString;
import org.apache.shardingsphere.infra.binder.segment.select.projection.Projection;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OracleDatabaseType;
+import org.apache.shardingsphere.infra.database.oracle.OracleDatabaseType;
import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
import java.util.Optional;
diff --git a/infra/common/pom.xml b/infra/common/pom.xml
index 309291456e331..159df29e050ab 100644
--- a/infra/common/pom.xml
+++ b/infra/common/pom.xml
@@ -37,9 +37,45 @@
shardingsphere-infra-util
${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-mysql
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-mariadb
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-postgresql
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-opengauss
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-oracle
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-sqlserver
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-h2
+ ${project.version}
+
org.apache.shardingsphere
- shardingsphere-infra-database-core
+ shardingsphere-infra-database-sql92
${project.version}
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
index 77f5519356648..e2f3e88a397f8 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
@@ -20,7 +20,7 @@
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.item.ExpressionProjectionSegment;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.item.ProjectionSegment;
diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/statistics/builder/dialect/PostgreSQLShardingSphereStatisticsBuilder.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/statistics/builder/dialect/PostgreSQLShardingSphereStatisticsBuilder.java
index d55caba5449d6..13898d44f608c 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/statistics/builder/dialect/PostgreSQLShardingSphereStatisticsBuilder.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/statistics/builder/dialect/PostgreSQLShardingSphereStatisticsBuilder.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.infra.metadata.statistics.builder.dialect;
import org.apache.shardingsphere.infra.autogen.version.ShardingSphereVersion;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics;
import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereDatabaseData;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/database/DatabaseTypeEngineTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/database/DatabaseTypeEngineTest.java
index 482026fad6881..814c865b76da1 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/database/DatabaseTypeEngineTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/database/DatabaseTypeEngineTest.java
@@ -21,10 +21,10 @@
import org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
+import org.apache.shardingsphere.infra.database.mariadb.MariaDBDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MariaDBDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.fixture.FixtureRuleConfiguration;
import org.apache.shardingsphere.infra.util.exception.external.sql.type.wrapper.SQLWrapperException;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaDataTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaDataTest.java
index f159f91cfd4e4..7a15d29170667 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaDataTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/ShardingSphereMetaDataTest.java
@@ -20,8 +20,8 @@
import org.apache.shardingsphere.infra.config.database.impl.DataSourceProvidedDatabaseConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.instance.InstanceContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java
index 9f9584ecc4eef..46085d7789162 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRuleTest.java
@@ -17,9 +17,9 @@
package org.apache.shardingsphere.infra.metadata.database.schema.builder;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
index e291e11906399..8adaca48248d7 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderTest.java
@@ -18,9 +18,9 @@
package org.apache.shardingsphere.infra.metadata.database.schema.builder;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import org.junit.jupiter.api.Test;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/common/SchemaMetaDataLoaderTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/common/SchemaMetaDataLoaderTest.java
index a17ca2f205827..ce34154180488 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/common/SchemaMetaDataLoaderTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/common/SchemaMetaDataLoaderTest.java
@@ -18,9 +18,9 @@
package org.apache.shardingsphere.infra.metadata.database.schema.loader.common;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
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 daa41fdae7f00..71ca75ae4e256 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
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtilsTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtilsTest.java
index b76b235a02914..b5ed9991004c2 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtilsTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtilsTest.java
@@ -17,9 +17,9 @@
package org.apache.shardingsphere.infra.metadata.database.schema.util;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.junit.jupiter.api.Test;
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/rule/builder/global/GlobalRulesBuilderTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/rule/builder/global/GlobalRulesBuilderTest.java
index a5800c6e6fdaa..f06e76edbbb91 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/rule/builder/global/GlobalRulesBuilderTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/rule/builder/global/GlobalRulesBuilderTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.infra.rule.builder.global;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
import org.apache.shardingsphere.infra.rule.builder.fixture.FixtureGlobalRule;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactory.java b/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactory.java
index c9ab085ac91d8..9f1d5a332714c 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactory.java
+++ b/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactory.java
@@ -41,7 +41,7 @@ public final class DatabaseTypeFactory {
public static DatabaseType get(final String url) {
Collection databaseTypes = ShardingSphereServiceLoader.getServiceInstances(DatabaseType.class).stream().filter(each -> matchURLs(url, each)).collect(Collectors.toList());
if (databaseTypes.isEmpty()) {
- return TypedSPILoader.getService(DatabaseType.class, "SQL92");
+ return TypedSPILoader.getService(DatabaseType.class, null);
}
for (DatabaseType each : databaseTypes) {
if (each instanceof BranchDatabaseType) {
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/DataSourceMetaDataTest.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/DataSourceMetaDataTest.java
deleted file mode 100644
index 161caed87c373..0000000000000
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/DataSourceMetaDataTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.infra.database.core.metadata;
-
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.H2DataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.MariaDBDataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.MySQLDataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.OracleDataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.PostgreSQLDataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.SQL92DataSourceMetaData;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.SQLServerDataSourceMetaData;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-class DataSourceMetaDataTest {
-
- @Test
- void assertIsInSameDatabaseInstanceWithH2() {
- H2DataSourceMetaData actual1 = new H2DataSourceMetaData("jdbc:h2:tcp://localhost:8082/~/test1/test2;DB_CLOSE_DELAY=-1");
- H2DataSourceMetaData actual2 = new H2DataSourceMetaData("jdbc:h2:tcp://localhost:8082/~/test1/test2;DB_CLOSE_DELAY=-1");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-
- @Test
- void assertIsInSameDatabaseInstanceWithMysql() {
- MySQLDataSourceMetaData actual1 = new MySQLDataSourceMetaData("jdbc:mysql://127.0.0.1:9999/ds_1?serverTimezone=UTC&useSSL=false");
- MySQLDataSourceMetaData actual2 = new MySQLDataSourceMetaData("jdbc:mysql://127.0.0.1:9999/ds_0?serverTimezone=UTC&useSSL=false");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-
- @Test
- void assertIsInSameDatabaseInstanceWithOracle() {
- OracleDataSourceMetaData actual1 = new OracleDataSourceMetaData("jdbc:oracle:thin:@//127.0.0.1:9999/ds_0", "test");
- OracleDataSourceMetaData actual2 = new OracleDataSourceMetaData("jdbc:oracle:thin:@//127.0.0.1:9999/ds_1", "test");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-
- @Test
- void assertIsInSameDatabaseInstanceWithMariaDB() {
- MariaDBDataSourceMetaData actual1 = new MariaDBDataSourceMetaData("jdbc:mariadb://127.0.0.1:9999/ds_0?serverTimezone=UTC&useSSL=false");
- MariaDBDataSourceMetaData actual2 = new MariaDBDataSourceMetaData("jdbc:mariadb://127.0.0.1:9999/ds_1?serverTimezone=UTC&useSSL=false");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-
- @Test
- void assertIsInSameDatabaseInstanceWithPostgreSQL() {
- PostgreSQLDataSourceMetaData actual1 = new PostgreSQLDataSourceMetaData("jdbc:postgresql://127.0.0.1/ds_0");
- PostgreSQLDataSourceMetaData actual2 = new PostgreSQLDataSourceMetaData("jdbc:postgresql://127.0.0.1/ds_1");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-
- @Test
- void assertIsInSameDatabaseInstanceWithSQL92() {
- SQL92DataSourceMetaData actual1 = new SQL92DataSourceMetaData("jdbc:sql92_db:ds_0");
- SQL92DataSourceMetaData actual2 = new SQL92DataSourceMetaData("jdbc:sql92_db:ds_1");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-
- @Test
- void assertIsInSameDatabaseInstanceWithSQLServer() {
- SQLServerDataSourceMetaData actual1 = new SQLServerDataSourceMetaData("jdbc:microsoft:sqlserver://127.0.0.1:9999;DatabaseName=ds_0");
- SQLServerDataSourceMetaData actual2 = new SQLServerDataSourceMetaData("jdbc:microsoft:sqlserver://127.0.0.1:9999;DatabaseName=ds_1");
- assertTrue(actual1.isInSameDatabaseInstance(actual2));
- }
-}
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/AbstractDataSourceMetaDataTest.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/AbstractDataSourceMetaDataTest.java
deleted file mode 100644
index 0b37516d0db5c..0000000000000
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/AbstractDataSourceMetaDataTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
-
-import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
-
-import java.util.Properties;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-abstract class AbstractDataSourceMetaDataTest {
-
- protected final void assertDataSourceMetaData(final String url, final String hostname, final int port, final String catalog, final String schema, final Properties queryProps) {
- DataSourceMetaData actual = createDataSourceMetaData(url);
- assertThat(actual.getHostname(), is(hostname));
- assertThat(actual.getPort(), is(port));
- assertThat(actual.getCatalog(), is(catalog));
- assertThat(actual.getSchema(), is(schema));
- assertThat(actual.getQueryProperties(), is(queryProps));
- }
-
- protected abstract DataSourceMetaData createDataSourceMetaData(String url);
-}
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/url/JdbcUrlAppenderTest.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/url/JdbcUrlAppenderTest.java
index b882cd58788e8..a0e8eb6063b54 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/url/JdbcUrlAppenderTest.java
+++ b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/url/JdbcUrlAppenderTest.java
@@ -29,9 +29,9 @@ class JdbcUrlAppenderTest {
@Test
void assertAppendQueryPropertiesWithoutOriginalQueryProperties() {
- String actual = new JdbcUrlAppender().appendQueryProperties("jdbc:mysql://192.168.0.1:3306/foo_ds",
+ String actual = new JdbcUrlAppender().appendQueryProperties("jdbc:infra.fixture://192.168.0.1:3306/foo_ds",
PropertiesBuilder.build(new Property("useSSL", Boolean.FALSE.toString()), new Property("rewriteBatchedStatements", Boolean.TRUE.toString())));
- assertThat(actual, startsWith("jdbc:mysql://192.168.0.1:3306/foo_ds?"));
+ assertThat(actual, startsWith("jdbc:infra.fixture://192.168.0.1:3306/foo_ds?"));
assertThat(actual, containsString("rewriteBatchedStatements=true"));
assertThat(actual, containsString("useSSL=false"));
}
@@ -39,9 +39,9 @@ void assertAppendQueryPropertiesWithoutOriginalQueryProperties() {
@Test
void assertAppendQueryPropertiesWithOriginalQueryProperties() {
String actual = new JdbcUrlAppender().appendQueryProperties(
- "jdbc:mysql://192.168.0.1:3306/foo_ds?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true",
+ "jdbc:infra.fixture://192.168.0.1:3306/foo_ds?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true",
PropertiesBuilder.build(new Property("useSSL", Boolean.FALSE.toString()), new Property("rewriteBatchedStatements", Boolean.TRUE.toString())));
- assertThat(actual, startsWith("jdbc:mysql://192.168.0.1:3306/foo_ds?"));
+ assertThat(actual, startsWith("jdbc:infra.fixture://192.168.0.1:3306/foo_ds?"));
assertThat(actual, containsString("serverTimezone=UTC"));
assertThat(actual, containsString("rewriteBatchedStatements=true"));
assertThat(actual, containsString("useSSL=false"));
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactoryTest.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactoryTest.java
index 89234bb0e0360..70744844d3731 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactoryTest.java
+++ b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/DatabaseTypeFactoryTest.java
@@ -36,6 +36,6 @@ void assertGetDatabaseTypeWithBranchURL() {
@Test
void assertGetDatabaseTypeWithUnrecognizedURL() {
- assertThat(DatabaseTypeFactory.get("jdbc:sqlite:test").getType(), is("SQL92"));
+ assertThat(DatabaseTypeFactory.get("jdbc:not-existed:test").getType(), is("INFRA.TRUNK.FIXTURE"));
}
}
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/DataSourceMetaDataFixture.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/DataSourceMetaDataFixture.java
new file mode 100644
index 0000000000000..1096d4626e3bf
--- /dev/null
+++ b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/DataSourceMetaDataFixture.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.infra.database.core.type.fixture;
+
+import lombok.Getter;
+import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
+
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Getter
+public final class DataSourceMetaDataFixture implements DataSourceMetaData {
+
+ private static final int DEFAULT_PORT = -1;
+
+ private static final Pattern URL_PATTERN = Pattern.compile("jdbc:infra", Pattern.CASE_INSENSITIVE);
+
+ private final String hostname;
+
+ private final int port;
+
+ private final String catalog;
+
+ private final String schema;
+
+ public DataSourceMetaDataFixture(final String url) {
+ Matcher matcher = URL_PATTERN.matcher(url);
+ if (!matcher.find()) {
+ throw new UnrecognizedDatabaseURLException(url, URL_PATTERN.pattern());
+ }
+ hostname = "";
+ port = DEFAULT_PORT;
+ catalog = "";
+ schema = null;
+ }
+
+ @Override
+ public Properties getQueryProperties() {
+ return new Properties();
+ }
+
+ @Override
+ public Properties getDefaultQueryProperties() {
+ return new Properties();
+ }
+}
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraBranchDatabaseTypeFixture.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraBranchDatabaseTypeFixture.java
index 08c82b15628bb..985ec9369b203 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraBranchDatabaseTypeFixture.java
+++ b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraBranchDatabaseTypeFixture.java
@@ -42,7 +42,7 @@ public Collection getJdbcUrlPrefixes() {
@Override
public DataSourceMetaData getDataSourceMetaData(final String url, final String username) {
- return null;
+ return new DataSourceMetaDataFixture(url);
}
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraTrunkDatabaseTypeFixture.java b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraTrunkDatabaseTypeFixture.java
index 5f6f6732ea27d..d6d8414464898 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraTrunkDatabaseTypeFixture.java
+++ b/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/fixture/InfraTrunkDatabaseTypeFixture.java
@@ -45,7 +45,7 @@ public Collection getJdbcUrlPrefixes() {
@Override
public DataSourceMetaData getDataSourceMetaData(final String url, final String username) {
- return null;
+ return new DataSourceMetaDataFixture(url);
}
@Override
@@ -62,4 +62,9 @@ public Collection getSystemSchemas() {
public String getType() {
return "INFRA.TRUNK.FIXTURE";
}
+
+ @Override
+ public boolean isDefault() {
+ return true;
+ }
}
diff --git a/infra/database/pom.xml b/infra/database/pom.xml
index 2ddb73773d4f0..ec618ace393f9 100644
--- a/infra/database/pom.xml
+++ b/infra/database/pom.xml
@@ -30,5 +30,6 @@
spi
core
+ type
diff --git a/infra/database/type/h2/pom.xml b/infra/database/type/h2/pom.xml
new file mode 100644
index 0000000000000..2f4b33c54c004
--- /dev/null
+++ b/infra/database/type/h2/pom.xml
@@ -0,0 +1,48 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-h2
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-mysql
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/H2DataSourceMetaData.java b/infra/database/type/h2/src/main/java/org/apache/shardingsphere/infra/database/h2/H2DataSourceMetaData.java
similarity index 98%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/H2DataSourceMetaData.java
rename to infra/database/type/h2/src/main/java/org/apache/shardingsphere/infra/database/h2/H2DataSourceMetaData.java
index cfb9513a40ea7..d25e2e2d98125 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/H2DataSourceMetaData.java
+++ b/infra/database/type/h2/src/main/java/org/apache/shardingsphere/infra/database/h2/H2DataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.h2;
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/H2DatabaseType.java b/infra/database/type/h2/src/main/java/org/apache/shardingsphere/infra/database/h2/H2DatabaseType.java
similarity index 93%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/H2DatabaseType.java
rename to infra/database/type/h2/src/main/java/org/apache/shardingsphere/infra/database/h2/H2DatabaseType.java
index 762cd5fb4d8ff..830fa92f6b720 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/H2DatabaseType.java
+++ b/infra/database/type/h2/src/main/java/org/apache/shardingsphere/infra/database/h2/H2DatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.h2;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.H2DataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.BranchDatabaseType;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
diff --git a/infra/database/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/h2/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
similarity index 55%
rename from infra/database/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
rename to infra/database/type/h2/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
index ada6eaaef5385..6d1291c802ce3 100644
--- a/infra/database/core/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
+++ b/infra/database/type/h2/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -15,11 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.infra.database.core.type.dialect.SQL92DatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.MariaDBDatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.OracleDatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.SQLServerDatabaseType
-org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType
+org.apache.shardingsphere.infra.database.h2.H2DatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/H2DataSourceMetaDataTest.java b/infra/database/type/h2/src/test/java/org/apache/shardingsphere/infra/database/h2/H2DataSourceMetaDataTest.java
similarity index 89%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/H2DataSourceMetaDataTest.java
rename to infra/database/type/h2/src/test/java/org/apache/shardingsphere/infra/database/h2/H2DataSourceMetaDataTest.java
index a8e19418cc527..2a835d8b737c1 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/H2DataSourceMetaDataTest.java
+++ b/infra/database/type/h2/src/test/java/org/apache/shardingsphere/infra/database/h2/H2DataSourceMetaDataTest.java
@@ -15,26 +15,32 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.h2;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;
-import java.util.Properties;
import java.util.stream.Stream;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-class H2DataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class H2DataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, new Properties());
+ DataSourceMetaData actual = new H2DataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertTrue(actual.getQueryProperties().isEmpty());
}
@ParameterizedTest(name = "{0}")
@@ -45,11 +51,6 @@ void assertIsInSameDatabaseInstance(final String name, final String url1, final
assertThat(actual1.isInSameDatabaseInstance(actual2), is(isSame));
}
- @Override
- protected H2DataSourceMetaData createDataSourceMetaData(final String url) {
- return new H2DataSourceMetaData(url);
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/H2DatabaseTypeTest.java b/infra/database/type/h2/src/test/java/org/apache/shardingsphere/infra/database/h2/H2DatabaseTypeTest.java
similarity index 93%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/H2DatabaseTypeTest.java
rename to infra/database/type/h2/src/test/java/org/apache/shardingsphere/infra/database/h2/H2DatabaseTypeTest.java
index ed5cfa541a1c6..8ecc9ce595b01 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/H2DatabaseTypeTest.java
+++ b/infra/database/type/h2/src/test/java/org/apache/shardingsphere/infra/database/h2/H2DatabaseTypeTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.h2;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.H2DataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.junit.jupiter.api.Test;
diff --git a/infra/database/type/mariadb/pom.xml b/infra/database/type/mariadb/pom.xml
new file mode 100644
index 0000000000000..e0bfdf806d372
--- /dev/null
+++ b/infra/database/type/mariadb/pom.xml
@@ -0,0 +1,48 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-mariadb
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-mysql
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MariaDBDataSourceMetaData.java b/infra/database/type/mariadb/src/main/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDataSourceMetaData.java
similarity index 97%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MariaDBDataSourceMetaData.java
rename to infra/database/type/mariadb/src/main/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDataSourceMetaData.java
index 4dfe7fcd39be6..8d5570cdb9bbd 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MariaDBDataSourceMetaData.java
+++ b/infra/database/type/mariadb/src/main/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.mariadb;
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/MariaDBDatabaseType.java b/infra/database/type/mariadb/src/main/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDatabaseType.java
similarity index 93%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/MariaDBDatabaseType.java
rename to infra/database/type/mariadb/src/main/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDatabaseType.java
index 2f5db435a247a..655d86ac95f5c 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/MariaDBDatabaseType.java
+++ b/infra/database/type/mariadb/src/main/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.mariadb;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.MariaDBDataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.BranchDatabaseType;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
diff --git a/infra/database/type/mariadb/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/mariadb/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..22e1f6627f617
--- /dev/null
+++ b/infra/database/type/mariadb/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.mariadb.MariaDBDatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MariaDBDataSourceMetaDataTest.java b/infra/database/type/mariadb/src/test/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDataSourceMetaDataTest.java
similarity index 81%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MariaDBDataSourceMetaDataTest.java
rename to infra/database/type/mariadb/src/test/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDataSourceMetaDataTest.java
index b702df0662596..4a50e66da66aa 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MariaDBDataSourceMetaDataTest.java
+++ b/infra/database/type/mariadb/src/test/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDataSourceMetaDataTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.mariadb;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.apache.shardingsphere.test.util.PropertiesBuilder;
import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
import org.junit.jupiter.api.Test;
@@ -30,14 +31,21 @@
import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
-class MariaDBDataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class MariaDBDataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructorWithSimpleJdbcUrl(final String name, final String url, final String hostname, final int port, final String catalog, final String schema, final Properties queryProps) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, queryProps);
+ DataSourceMetaData actual = new MariaDBDataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertThat(actual.getQueryProperties(), is(queryProps));
}
@Test
@@ -45,11 +53,6 @@ void assertNewConstructorFailure() {
assertThrows(UnrecognizedDatabaseURLException.class, () -> new MariaDBDataSourceMetaData("jdbc:mariadb:xxxxxxxx"));
}
- @Override
- protected MariaDBDataSourceMetaData createDataSourceMetaData(final String url) {
- return new MariaDBDataSourceMetaData(url);
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/MariaDBDatabaseTypeTest.java b/infra/database/type/mariadb/src/test/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDatabaseTypeTest.java
similarity index 92%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/MariaDBDatabaseTypeTest.java
rename to infra/database/type/mariadb/src/test/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDatabaseTypeTest.java
index a11fc8fa42c25..90483bfba357e 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/MariaDBDatabaseTypeTest.java
+++ b/infra/database/type/mariadb/src/test/java/org/apache/shardingsphere/infra/database/mariadb/MariaDBDatabaseTypeTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.mariadb;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.MariaDBDataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.junit.jupiter.api.Test;
diff --git a/infra/database/type/mysql/pom.xml b/infra/database/type/mysql/pom.xml
new file mode 100644
index 0000000000000..ee2f2f8e5416b
--- /dev/null
+++ b/infra/database/type/mysql/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-mysql
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MySQLDataSourceMetaData.java b/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/MySQLDataSourceMetaData.java
similarity index 97%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MySQLDataSourceMetaData.java
rename to infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/MySQLDataSourceMetaData.java
index 025ec294ef0fb..880bfe16256a1 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MySQLDataSourceMetaData.java
+++ b/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/MySQLDataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.mysql;
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/MySQLDatabaseType.java b/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/MySQLDatabaseType.java
similarity index 97%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/MySQLDatabaseType.java
rename to infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/MySQLDatabaseType.java
index 08121a8a8ba76..6a3f73c122f25 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/MySQLDatabaseType.java
+++ b/infra/database/type/mysql/src/main/java/org/apache/shardingsphere/infra/database/mysql/MySQLDatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.mysql;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.MySQLDataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.DataSourceAggregatableDatabaseType;
import org.apache.shardingsphere.infra.database.core.type.TrunkDatabaseType;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
diff --git a/infra/database/type/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..b044670499384
--- /dev/null
+++ b/infra/database/type/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MySQLDataSourceMetaDataTest.java b/infra/database/type/mysql/src/test/java/org/apache/shardingsphere/infra/database/mysql/MySQLDataSourceMetaDataTest.java
similarity index 81%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MySQLDataSourceMetaDataTest.java
rename to infra/database/type/mysql/src/test/java/org/apache/shardingsphere/infra/database/mysql/MySQLDataSourceMetaDataTest.java
index def71ae951909..4ce0d3fab536a 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/MySQLDataSourceMetaDataTest.java
+++ b/infra/database/type/mysql/src/test/java/org/apache/shardingsphere/infra/database/mysql/MySQLDataSourceMetaDataTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.mysql;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.apache.shardingsphere.test.util.PropertiesBuilder;
import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
import org.junit.jupiter.api.Test;
@@ -30,14 +31,21 @@
import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
-class MySQLDataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class MySQLDataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema, final Properties queryProps) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, queryProps);
+ DataSourceMetaData actual = new MySQLDataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertThat(actual.getQueryProperties(), is(queryProps));
}
@Test
@@ -45,11 +53,6 @@ void assertNewConstructorFailure() {
assertThrows(UnrecognizedDatabaseURLException.class, () -> new MySQLDataSourceMetaData("jdbc:mysql:xxxxxxxx"));
}
- @Override
- protected MySQLDataSourceMetaData createDataSourceMetaData(final String url) {
- return new MySQLDataSourceMetaData(url);
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/MySQLDatabaseTypeTest.java b/infra/database/type/mysql/src/test/java/org/apache/shardingsphere/infra/database/mysql/MySQLDatabaseTypeTest.java
similarity index 88%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/MySQLDatabaseTypeTest.java
rename to infra/database/type/mysql/src/test/java/org/apache/shardingsphere/infra/database/mysql/MySQLDatabaseTypeTest.java
index 2cf3482b75a85..3f0e58065043e 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/MySQLDatabaseTypeTest.java
+++ b/infra/database/type/mysql/src/test/java/org/apache/shardingsphere/infra/database/mysql/MySQLDatabaseTypeTest.java
@@ -15,16 +15,15 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.mysql;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.MySQLDataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
+import org.hamcrest.CoreMatchers;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.HashSet;
-import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -43,7 +42,7 @@ void assertGetJdbcUrlPrefixes() {
@Test
void assertGetDataSourceMetaData() {
- assertThat(new MySQLDatabaseType().getDataSourceMetaData("jdbc:mysql://127.0.0.1/foo_ds", "root"), instanceOf(MySQLDataSourceMetaData.class));
+ assertThat(new MySQLDatabaseType().getDataSourceMetaData("jdbc:mysql://127.0.0.1/foo_ds", "root"), CoreMatchers.instanceOf(MySQLDataSourceMetaData.class));
}
@Test
diff --git a/infra/database/type/opengauss/pom.xml b/infra/database/type/opengauss/pom.xml
new file mode 100644
index 0000000000000..441e65060097b
--- /dev/null
+++ b/infra/database/type/opengauss/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-opengauss
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OpenGaussDataSourceMetaData.java b/infra/database/type/opengauss/src/main/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDataSourceMetaData.java
similarity index 96%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OpenGaussDataSourceMetaData.java
rename to infra/database/type/opengauss/src/main/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDataSourceMetaData.java
index dbb2a5efb1de5..554bf4973f5bf 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OpenGaussDataSourceMetaData.java
+++ b/infra/database/type/opengauss/src/main/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.opengauss;
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/OpenGaussDatabaseType.java b/infra/database/type/opengauss/src/main/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDatabaseType.java
similarity index 97%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/OpenGaussDatabaseType.java
rename to infra/database/type/opengauss/src/main/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDatabaseType.java
index 4bca5ed380db5..8b4a465f5e797 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/OpenGaussDatabaseType.java
+++ b/infra/database/type/opengauss/src/main/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.opengauss;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.OpenGaussDataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.TrunkDatabaseType;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
diff --git a/infra/database/type/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..03e3b0ac02303
--- /dev/null
+++ b/infra/database/type/opengauss/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OpenGaussDataSourceMetaDataTest.java b/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDataSourceMetaDataTest.java
similarity index 79%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OpenGaussDataSourceMetaDataTest.java
rename to infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDataSourceMetaDataTest.java
index 95ec4f1ebbfcb..49f516da63cf8 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OpenGaussDataSourceMetaDataTest.java
+++ b/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDataSourceMetaDataTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.opengauss;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.apache.shardingsphere.test.util.PropertiesBuilder;
import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
import org.junit.jupiter.api.Test;
@@ -30,24 +31,26 @@
import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
-class OpenGaussDataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class OpenGaussDataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema, final Properties queryProps) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, queryProps);
+ DataSourceMetaData actual = new OpenGaussDataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertThat(actual.getQueryProperties(), is(queryProps));
}
@Test
void assertNewConstructorFailure() {
- assertThrows(UnrecognizedDatabaseURLException.class, () -> new PostgreSQLDataSourceMetaData("jdbc:opengauss:xxxxxxxx"));
- }
-
- @Override
- protected OpenGaussDataSourceMetaData createDataSourceMetaData(final String url) {
- return new OpenGaussDataSourceMetaData(url);
+ assertThrows(UnrecognizedDatabaseURLException.class, () -> new OpenGaussDataSourceMetaData("jdbc:opengauss:xxxxxxxx"));
}
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
diff --git a/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDatabaseTypeTest.java b/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDatabaseTypeTest.java
new file mode 100644
index 0000000000000..013ca275bf885
--- /dev/null
+++ b/infra/database/type/opengauss/src/test/java/org/apache/shardingsphere/infra/database/opengauss/OpenGaussDatabaseTypeTest.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.infra.database.opengauss;
+
+import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.CommitStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.RollbackStatement;
+import org.junit.jupiter.api.Test;
+
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Optional;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
+
+class OpenGaussDatabaseTypeTest {
+
+ @Test
+ void assertGetQuoteCharacter() {
+ assertThat(new OpenGaussDatabaseType().getQuoteCharacter(), is(QuoteCharacter.QUOTE));
+ }
+
+ @Test
+ void assertGetJdbcUrlPrefixes() {
+ assertThat(new OpenGaussDatabaseType().getJdbcUrlPrefixes(), is(Collections.singleton("jdbc:opengauss:")));
+ }
+
+ @Test
+ void assertGetDataSourceMetaData() {
+ assertThat(new OpenGaussDatabaseType().getDataSourceMetaData("jdbc:opengauss://localhost:5432/demo_ds_0", "postgres"), instanceOf(OpenGaussDataSourceMetaData.class));
+ }
+
+ @Test
+ void assertHandleRollbackOnlyForNotRollbackOnly() {
+ assertDoesNotThrow(() -> new OpenGaussDatabaseType().handleRollbackOnly(false, mock(CommitStatement.class)));
+ }
+
+ @Test
+ void assertHandleRollbackOnlyForRollbackOnlyAndCommitStatement() {
+ assertDoesNotThrow(() -> new OpenGaussDatabaseType().handleRollbackOnly(true, mock(CommitStatement.class)));
+ }
+
+ @Test
+ void assertHandleRollbackOnlyForRollbackOnlyAndRollbackStatement() {
+ assertDoesNotThrow(() -> new OpenGaussDatabaseType().handleRollbackOnly(true, mock(RollbackStatement.class)));
+ }
+
+ @Test
+ void assertHandleRollbackOnlyForRollbackOnlyAndNotTCLStatement() {
+ assertThrows(SQLFeatureNotSupportedException.class, () -> new OpenGaussDatabaseType().handleRollbackOnly(true, mock(SelectStatement.class)));
+ }
+
+ @Test
+ void assertGetSystemDatabases() {
+ assertTrue(new OpenGaussDatabaseType().getSystemDatabaseSchemaMap().containsKey("postgres"));
+ }
+
+ @Test
+ void assertGetSystemSchemas() {
+ assertThat(new OpenGaussDatabaseType().getSystemSchemas(), is(new HashSet<>(Arrays.asList("information_schema", "pg_catalog", "blockchain",
+ "cstore", "db4ai", "dbe_perf", "dbe_pldebugger", "gaussdb", "oracle", "pkg_service", "snapshot", "sqladvisor", "dbe_pldeveloper", "pg_toast", "pkg_util", "shardingsphere"))));
+ }
+
+ @Test
+ void assertIsSchemaAvailable() {
+ assertTrue(new OpenGaussDatabaseType().isSchemaAvailable());
+ }
+
+ @Test
+ void assertGetDefaultSchema() {
+ assertThat(new OpenGaussDatabaseType().getDefaultSchema(), is(Optional.of("public")));
+ }
+}
diff --git a/infra/database/type/oracle/pom.xml b/infra/database/type/oracle/pom.xml
new file mode 100644
index 0000000000000..319d383a508b3
--- /dev/null
+++ b/infra/database/type/oracle/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-oracle
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OracleDataSourceMetaData.java b/infra/database/type/oracle/src/main/java/org/apache/shardingsphere/infra/database/oracle/OracleDataSourceMetaData.java
similarity index 97%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OracleDataSourceMetaData.java
rename to infra/database/type/oracle/src/main/java/org/apache/shardingsphere/infra/database/oracle/OracleDataSourceMetaData.java
index a45969075c6e0..562bd1878564b 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OracleDataSourceMetaData.java
+++ b/infra/database/type/oracle/src/main/java/org/apache/shardingsphere/infra/database/oracle/OracleDataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.oracle;
import com.google.common.base.Strings;
import lombok.Getter;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/OracleDatabaseType.java b/infra/database/type/oracle/src/main/java/org/apache/shardingsphere/infra/database/oracle/OracleDatabaseType.java
similarity index 96%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/OracleDatabaseType.java
rename to infra/database/type/oracle/src/main/java/org/apache/shardingsphere/infra/database/oracle/OracleDatabaseType.java
index ef86d8eba02e9..f6783006e40e1 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/OracleDatabaseType.java
+++ b/infra/database/type/oracle/src/main/java/org/apache/shardingsphere/infra/database/oracle/OracleDatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.oracle;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.OracleDataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.TrunkDatabaseType;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
diff --git a/infra/database/type/oracle/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/oracle/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..de7eb34dfd9c9
--- /dev/null
+++ b/infra/database/type/oracle/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.oracle.OracleDatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OracleDataSourceMetaDataTest.java b/infra/database/type/oracle/src/test/java/org/apache/shardingsphere/infra/database/oracle/OracleDataSourceMetaDataTest.java
similarity index 86%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OracleDataSourceMetaDataTest.java
rename to infra/database/type/oracle/src/test/java/org/apache/shardingsphere/infra/database/oracle/OracleDataSourceMetaDataTest.java
index e42adf6f1a679..0daf24055be75 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/OracleDataSourceMetaDataTest.java
+++ b/infra/database/type/oracle/src/test/java/org/apache/shardingsphere/infra/database/oracle/OracleDataSourceMetaDataTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.oracle;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
@@ -25,17 +26,24 @@
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;
-import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-class OracleDataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class OracleDataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, new Properties());
+ DataSourceMetaData actual = new OracleDataSourceMetaData(url, "test");
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertTrue(actual.getQueryProperties().isEmpty());
}
@Test
@@ -43,11 +51,6 @@ void assertNewConstructorFailure() {
assertThrows(UnrecognizedDatabaseURLException.class, () -> new OracleDataSourceMetaData("jdbc:oracle:xxxxxxxx", "test"));
}
- @Override
- protected OracleDataSourceMetaData createDataSourceMetaData(final String url) {
- return new OracleDataSourceMetaData(url, "test");
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/OracleDatabaseTypeTest.java b/infra/database/type/oracle/src/test/java/org/apache/shardingsphere/infra/database/oracle/OracleDatabaseTypeTest.java
similarity index 94%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/OracleDatabaseTypeTest.java
rename to infra/database/type/oracle/src/test/java/org/apache/shardingsphere/infra/database/oracle/OracleDatabaseTypeTest.java
index 298af909d683d..20adce4ea4a0f 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/OracleDatabaseTypeTest.java
+++ b/infra/database/type/oracle/src/test/java/org/apache/shardingsphere/infra/database/oracle/OracleDatabaseTypeTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.oracle;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.OracleDataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.junit.jupiter.api.Test;
@@ -27,8 +26,8 @@
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.jupiter.api.Assertions.assertNull;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.mock;
diff --git a/infra/database/type/pom.xml b/infra/database/type/pom.xml
new file mode 100644
index 0000000000000..6306cbc04cd21
--- /dev/null
+++ b/infra/database/type/pom.xml
@@ -0,0 +1,40 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-type
+ pom
+ ${project.artifactId}
+
+
+ mysql
+ mariadb
+ postgresql
+ opengauss
+ oracle
+ sqlserver
+ h2
+ sql92
+
+
diff --git a/infra/database/type/postgresql/pom.xml b/infra/database/type/postgresql/pom.xml
new file mode 100644
index 0000000000000..f68ea9ef8a967
--- /dev/null
+++ b/infra/database/type/postgresql/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-postgresql
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/PostgreSQLDataSourceMetaData.java b/infra/database/type/postgresql/src/main/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDataSourceMetaData.java
similarity index 96%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/PostgreSQLDataSourceMetaData.java
rename to infra/database/type/postgresql/src/main/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDataSourceMetaData.java
index 9763f6c89bc32..11d1abd905d06 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/PostgreSQLDataSourceMetaData.java
+++ b/infra/database/type/postgresql/src/main/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.postgresql;
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/PostgreSQLDatabaseType.java b/infra/database/type/postgresql/src/main/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDatabaseType.java
similarity index 96%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/PostgreSQLDatabaseType.java
rename to infra/database/type/postgresql/src/main/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDatabaseType.java
index 1360ffbe700b5..7f1a3353f3365 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/PostgreSQLDatabaseType.java
+++ b/infra/database/type/postgresql/src/main/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.postgresql;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.PostgreSQLDataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.TrunkDatabaseType;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
diff --git a/infra/database/type/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..152fd5be632e4
--- /dev/null
+++ b/infra/database/type/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/PostgreSQLDataSourceMetaDataTest.java b/infra/database/type/postgresql/src/test/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDataSourceMetaDataTest.java
similarity index 81%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/PostgreSQLDataSourceMetaDataTest.java
rename to infra/database/type/postgresql/src/test/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDataSourceMetaDataTest.java
index f6309d72b539e..defaea230d968 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/PostgreSQLDataSourceMetaDataTest.java
+++ b/infra/database/type/postgresql/src/test/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDataSourceMetaDataTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.postgresql;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.apache.shardingsphere.test.util.PropertiesBuilder;
import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
import org.junit.jupiter.api.Test;
@@ -30,14 +31,21 @@
import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
-class PostgreSQLDataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class PostgreSQLDataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema, final Properties queryProps) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, queryProps);
+ DataSourceMetaData actual = new PostgreSQLDataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertThat(actual.getQueryProperties(), is(queryProps));
}
@Test
@@ -45,11 +53,6 @@ void assertNewConstructorFailure() {
assertThrows(UnrecognizedDatabaseURLException.class, () -> new PostgreSQLDataSourceMetaData("jdbc:postgresql:xxxxxxxx"));
}
- @Override
- protected PostgreSQLDataSourceMetaData createDataSourceMetaData(final String url) {
- return new PostgreSQLDataSourceMetaData(url);
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/PostgreSQLDatabaseTypeTest.java b/infra/database/type/postgresql/src/test/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDatabaseTypeTest.java
similarity index 95%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/PostgreSQLDatabaseTypeTest.java
rename to infra/database/type/postgresql/src/test/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDatabaseTypeTest.java
index 5fe9b84676150..44b4758bbea90 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/PostgreSQLDatabaseTypeTest.java
+++ b/infra/database/type/postgresql/src/test/java/org/apache/shardingsphere/infra/database/postgresql/PostgreSQLDatabaseTypeTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.postgresql;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.PostgreSQLDataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement;
import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.CommitStatement;
diff --git a/infra/database/type/sql92/pom.xml b/infra/database/type/sql92/pom.xml
new file mode 100644
index 0000000000000..fc737de2ddf3b
--- /dev/null
+++ b/infra/database/type/sql92/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-sql92
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQL92DataSourceMetaData.java b/infra/database/type/sql92/src/main/java/org/apache/shardingsphere/infra/database/sql92/SQL92DataSourceMetaData.java
similarity index 96%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQL92DataSourceMetaData.java
rename to infra/database/type/sql92/src/main/java/org/apache/shardingsphere/infra/database/sql92/SQL92DataSourceMetaData.java
index 9f9f09eddb211..81a73c26d49a4 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQL92DataSourceMetaData.java
+++ b/infra/database/type/sql92/src/main/java/org/apache/shardingsphere/infra/database/sql92/SQL92DataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.sql92;
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQL92DatabaseType.java b/infra/database/type/sql92/src/main/java/org/apache/shardingsphere/infra/database/sql92/SQL92DatabaseType.java
similarity index 92%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQL92DatabaseType.java
rename to infra/database/type/sql92/src/main/java/org/apache/shardingsphere/infra/database/sql92/SQL92DatabaseType.java
index 93282d0efe9a1..2b996af3dbe74 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQL92DatabaseType.java
+++ b/infra/database/type/sql92/src/main/java/org/apache/shardingsphere/infra/database/sql92/SQL92DatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.sql92;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.SQL92DataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.TrunkDatabaseType;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
@@ -59,4 +58,9 @@ public Collection getSystemSchemas() {
public String getType() {
return "SQL92";
}
+
+ @Override
+ public boolean isDefault() {
+ return true;
+ }
}
diff --git a/infra/database/type/sql92/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/sql92/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..caf4100a778e3
--- /dev/null
+++ b/infra/database/type/sql92/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.sql92.SQL92DatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQL92DataSourceMetaDataTest.java b/infra/database/type/sql92/src/test/java/org/apache/shardingsphere/infra/database/sql92/SQL92DataSourceMetaDataTest.java
similarity index 76%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQL92DataSourceMetaDataTest.java
rename to infra/database/type/sql92/src/test/java/org/apache/shardingsphere/infra/database/sql92/SQL92DataSourceMetaDataTest.java
index a40a7015a8d9f..1bd114c0dd755 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQL92DataSourceMetaDataTest.java
+++ b/infra/database/type/sql92/src/test/java/org/apache/shardingsphere/infra/database/sql92/SQL92DataSourceMetaDataTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.sql92;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
@@ -25,17 +26,24 @@
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;
-import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-class SQL92DataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class SQL92DataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, new Properties());
+ DataSourceMetaData actual = new SQL92DataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertTrue(actual.getQueryProperties().isEmpty());
}
@Test
@@ -43,11 +51,6 @@ void assertNewConstructorFailure() {
assertThrows(UnrecognizedDatabaseURLException.class, () -> new SQL92DataSourceMetaData("xxx:xxxx:xxxxxxxx"));
}
- @Override
- protected SQL92DataSourceMetaData createDataSourceMetaData(final String url) {
- return new SQL92DataSourceMetaData(url);
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQL92DatabaseTypeTest.java b/infra/database/type/sql92/src/test/java/org/apache/shardingsphere/infra/database/sql92/SQL92DatabaseTypeTest.java
similarity index 92%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQL92DatabaseTypeTest.java
rename to infra/database/type/sql92/src/test/java/org/apache/shardingsphere/infra/database/sql92/SQL92DatabaseTypeTest.java
index 969d7441e8af0..e2d72ea39004f 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQL92DatabaseTypeTest.java
+++ b/infra/database/type/sql92/src/test/java/org/apache/shardingsphere/infra/database/sql92/SQL92DatabaseTypeTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.sql92;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.SQL92DataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.junit.jupiter.api.Test;
diff --git a/infra/database/type/sqlserver/pom.xml b/infra/database/type/sqlserver/pom.xml
new file mode 100644
index 0000000000000..859ebbf484528
--- /dev/null
+++ b/infra/database/type/sqlserver/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-type
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-database-sqlserver
+ ${project.artifactId}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-infra-database-core
+ ${project.version}
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-test-util
+ ${project.version}
+ test
+
+
+
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQLServerDataSourceMetaData.java b/infra/database/type/sqlserver/src/main/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDataSourceMetaData.java
similarity index 97%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQLServerDataSourceMetaData.java
rename to infra/database/type/sqlserver/src/main/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDataSourceMetaData.java
index d35ecb5f80198..d93f2aa3cd644 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQLServerDataSourceMetaData.java
+++ b/infra/database/type/sqlserver/src/main/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDataSourceMetaData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.sqlserver;
import com.google.common.base.Strings;
import lombok.Getter;
diff --git a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQLServerDatabaseType.java b/infra/database/type/sqlserver/src/main/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDatabaseType.java
similarity index 92%
rename from infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQLServerDatabaseType.java
rename to infra/database/type/sqlserver/src/main/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDatabaseType.java
index c62bfc46cd7d7..a95d5cad6230e 100644
--- a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQLServerDatabaseType.java
+++ b/infra/database/type/sqlserver/src/main/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDatabaseType.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.sqlserver;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.SQLServerDataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.type.TrunkDatabaseType;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
diff --git a/infra/database/type/sqlserver/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType b/infra/database/type/sqlserver/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
new file mode 100644
index 0000000000000..a77b97b2858f3
--- /dev/null
+++ b/infra/database/type/sqlserver/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.database.spi.DatabaseType
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.infra.database.sqlserver.SQLServerDatabaseType
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQLServerDataSourceMetaDataTest.java b/infra/database/type/sqlserver/src/test/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDataSourceMetaDataTest.java
similarity index 83%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQLServerDataSourceMetaDataTest.java
rename to infra/database/type/sqlserver/src/test/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDataSourceMetaDataTest.java
index 26242129743b9..1d015f42e1670 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/metadata/dialect/SQLServerDataSourceMetaDataTest.java
+++ b/infra/database/type/sqlserver/src/test/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDataSourceMetaDataTest.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.metadata.dialect;
+package org.apache.shardingsphere.infra.database.sqlserver;
-import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.apache.shardingsphere.infra.database.core.metadata.UnrecognizedDatabaseURLException;
+import org.apache.shardingsphere.infra.database.spi.DataSourceMetaData;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
@@ -26,17 +26,24 @@
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;
-import java.util.Properties;
import java.util.stream.Stream;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-class SQLServerDataSourceMetaDataTest extends AbstractDataSourceMetaDataTest {
+class SQLServerDataSourceMetaDataTest {
@ParameterizedTest(name = "{0}")
@ArgumentsSource(NewConstructorTestCaseArgumentsProvider.class)
void assertNewConstructor(final String name, final String url, final String hostname, final int port, final String catalog, final String schema) {
- assertDataSourceMetaData(url, hostname, port, catalog, schema, new Properties());
+ DataSourceMetaData actual = new SQLServerDataSourceMetaData(url);
+ assertThat(actual.getHostname(), is(hostname));
+ assertThat(actual.getPort(), is(port));
+ assertThat(actual.getCatalog(), is(catalog));
+ assertThat(actual.getSchema(), is(schema));
+ assertTrue(actual.getQueryProperties().isEmpty());
}
@Test
@@ -44,11 +51,6 @@ void assertNewConstructorFailure() {
assertThrows(UnrecognizedDatabaseURLException.class, () -> new SQLServerDataSourceMetaData("jdbc:sqlserver:xxxxxxxx"));
}
- @Override
- protected DataSourceMetaData createDataSourceMetaData(final String url) {
- return new SQLServerDataSourceMetaData(url);
- }
-
private static class NewConstructorTestCaseArgumentsProvider implements ArgumentsProvider {
@Override
diff --git a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQLServerDatabaseTypeTest.java b/infra/database/type/sqlserver/src/test/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDatabaseTypeTest.java
similarity index 93%
rename from infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQLServerDatabaseTypeTest.java
rename to infra/database/type/sqlserver/src/test/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDatabaseTypeTest.java
index ae54b4da183c9..c2868381b5e90 100644
--- a/infra/database/core/src/test/java/org/apache/shardingsphere/infra/database/core/type/dialect/SQLServerDatabaseTypeTest.java
+++ b/infra/database/type/sqlserver/src/test/java/org/apache/shardingsphere/infra/database/sqlserver/SQLServerDatabaseTypeTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.database.core.type.dialect;
+package org.apache.shardingsphere.infra.database.sqlserver;
-import org.apache.shardingsphere.infra.database.core.metadata.dialect.SQLServerDataSourceMetaData;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.junit.jupiter.api.Test;
diff --git a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/memory/JDBCMemoryQueryResultTest.java b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/memory/JDBCMemoryQueryResultTest.java
index 2ebafffa79781..235dfb106a5ed 100644
--- a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/memory/JDBCMemoryQueryResultTest.java
+++ b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/result/query/impl/driver/jdbc/type/memory/JDBCMemoryQueryResultTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.memory;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.hamcrest.core.Is;
import org.junit.jupiter.api.Test;
diff --git a/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/SQLRewriteEntryTest.java b/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/SQLRewriteEntryTest.java
index eb0ebc1b399b8..7795159db09a6 100644
--- a/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/SQLRewriteEntryTest.java
+++ b/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/SQLRewriteEntryTest.java
@@ -21,8 +21,8 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/pojo/generic/SubstitutableColumnNameTokenTest.java b/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/pojo/generic/SubstitutableColumnNameTokenTest.java
index ed737360c9947..549a84d6491cc 100644
--- a/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/pojo/generic/SubstitutableColumnNameTokenTest.java
+++ b/infra/rewrite/src/test/java/org/apache/shardingsphere/infra/rewrite/sql/token/pojo/generic/SubstitutableColumnNameTokenTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.infra.binder.segment.select.projection.Projection;
import org.apache.shardingsphere.infra.binder.segment.select.projection.impl.ColumnProjection;
import org.apache.shardingsphere.infra.binder.segment.select.projection.impl.SubqueryProjection;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OracleDatabaseType;
+import org.apache.shardingsphere.infra.database.oracle.OracleDatabaseType;
import org.apache.shardingsphere.infra.route.context.RouteUnit;
import org.apache.shardingsphere.sql.parser.sql.common.enums.QuoteCharacter;
import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
diff --git a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java
index 98f7362e01ee8..da6bf408bf59f 100644
--- a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java
+++ b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java
@@ -42,7 +42,7 @@
import org.apache.shardingsphere.infra.connection.kernel.KernelProcessor;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.database.DatabaseTypeEngine;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.audit.SQLAuditEngine;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
diff --git a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
index e815455e672cb..333613ee1a2b1 100644
--- a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
+++ b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
@@ -42,7 +42,7 @@
import org.apache.shardingsphere.infra.connection.kernel.KernelProcessor;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.database.DatabaseTypeEngine;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.audit.SQLAuditEngine;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/PreparedStatementAdapterTest.java b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/PreparedStatementAdapterTest.java
index 9d894f47e2774..0bf616767f405 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/PreparedStatementAdapterTest.java
+++ b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/PreparedStatementAdapterTest.java
@@ -21,7 +21,7 @@
import org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.parser.rule.SQLParserRule;
import org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationPreparedStatementTest.java b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationPreparedStatementTest.java
index 97af5d5327a45..bac3a0c6eb1b2 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationPreparedStatementTest.java
+++ b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationPreparedStatementTest.java
@@ -21,7 +21,7 @@
import org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.parser.rule.SQLParserRule;
import org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java
index 30521512f39a9..ef32fe2f8c57c 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java
+++ b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/DriverStateContextTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/util/JDBCStreamQueryUtils.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/util/JDBCStreamQueryUtils.java
index 2f0b58c9b103e..129af2ec2d0e1 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/util/JDBCStreamQueryUtils.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/util/JDBCStreamQueryUtils.java
@@ -22,8 +22,8 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.infra.database.core.type.BranchDatabaseType;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
index a243e1853d552..883a2e2740bd2 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
@@ -29,7 +29,7 @@
import org.apache.shardingsphere.data.pipeline.core.exception.PipelineSQLException;
import org.apache.shardingsphere.data.pipeline.core.exception.data.PipelineTableDataConsistencyCheckLoadingFailedException;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.util.close.QuietlyCloser;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader;
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/dumper/InventoryDumper.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/dumper/InventoryDumper.java
index dbccafaa1b3a8..47e4c2ce83854 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/dumper/InventoryDumper.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/dumper/InventoryDumper.java
@@ -47,7 +47,7 @@
import org.apache.shardingsphere.data.pipeline.core.exception.param.PipelineInvalidParameterException;
import org.apache.shardingsphere.data.pipeline.spi.ratelimit.JobRateLimitAlgorithm;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import javax.sql.DataSource;
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/InventoryRecordsCountCalculator.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/InventoryRecordsCountCalculator.java
index 7371637862d05..7efe0907b4fdb 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/InventoryRecordsCountCalculator.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/preparer/InventoryRecordsCountCalculator.java
@@ -26,7 +26,7 @@
import org.apache.shardingsphere.data.pipeline.common.sqlbuilder.PipelineCommonSQLBuilder;
import org.apache.shardingsphere.data.pipeline.core.exception.job.SplitPipelineJobByUniqueKeyException;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
import javax.sql.DataSource;
diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceWrapperTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceWrapperTest.java
index 45003fe2de24d..c469ee9fd30d1 100644
--- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceWrapperTest.java
+++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/datasource/PipelineDataSourceWrapperTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.data.pipeline.common.datasource;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
index 5d7a6729855f7..9bd9e9550588b 100644
--- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
+++ b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
@@ -22,7 +22,7 @@
import org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineIndexMetaData;
import org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineTableMetaData;
import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceWrapper;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.test.fixture.jdbc.MockedDataSource;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
diff --git a/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/OpenGaussLogicalReplication.java b/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/OpenGaussLogicalReplication.java
index 704c772ea980d..dd0185b831024 100644
--- a/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/OpenGaussLogicalReplication.java
+++ b/kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/OpenGaussLogicalReplication.java
@@ -23,7 +23,7 @@
import org.apache.shardingsphere.data.pipeline.postgresql.ingest.wal.decode.BaseLogSequenceNumber;
import org.apache.shardingsphere.infra.database.core.metadata.url.JdbcUrl;
import org.apache.shardingsphere.infra.database.core.metadata.url.StandardJdbcUrlParser;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.opengauss.PGProperty;
import org.opengauss.jdbc.PgConnection;
import org.opengauss.replication.LogSequenceNumber;
diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/prepare/CDCJobPreparer.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/prepare/CDCJobPreparer.java
index 74b342dfb2f59..2aed186e9f310 100644
--- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/prepare/CDCJobPreparer.java
+++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/prepare/CDCJobPreparer.java
@@ -47,7 +47,7 @@
import org.apache.shardingsphere.data.pipeline.spi.ingest.dumper.IncrementalDumperCreator;
import org.apache.shardingsphere.infra.spi.DatabaseTypedSPILoader;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import java.sql.SQLException;
import java.util.Collection;
diff --git a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/handler/CDCBackendHandler.java b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/handler/CDCBackendHandler.java
index 2e6a76adb005a..20cc739eaaf2c 100644
--- a/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/handler/CDCBackendHandler.java
+++ b/kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/handler/CDCBackendHandler.java
@@ -47,7 +47,7 @@
import org.apache.shardingsphere.data.pipeline.core.exception.job.PipelineJobNotFoundException;
import org.apache.shardingsphere.data.pipeline.core.exception.param.PipelineInvalidParameterException;
import org.apache.shardingsphere.data.pipeline.core.job.PipelineJobCenter;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
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 f54ae0ca23534..9a4ac1b4ab04b 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
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.data.pipeline.cdc.util;
import org.apache.shardingsphere.data.pipeline.cdc.protocol.request.StreamDataRequestBody.SchemaTable;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
diff --git a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDeciderTest.java b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDeciderTest.java
index bd6aa3f85a9e4..f1061f24699ff 100644
--- a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDeciderTest.java
+++ b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/decider/SingleSQLFederationDeciderTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/kernel/single/distsql/handler/src/test/java/org/apache/shardingsphere/single/distsql/handler/update/LoadSingleTableStatementUpdaterTest.java b/kernel/single/distsql/handler/src/test/java/org/apache/shardingsphere/single/distsql/handler/update/LoadSingleTableStatementUpdaterTest.java
index 614c7f87c01ca..6b08b6cc55922 100644
--- a/kernel/single/distsql/handler/src/test/java/org/apache/shardingsphere/single/distsql/handler/update/LoadSingleTableStatementUpdaterTest.java
+++ b/kernel/single/distsql/handler/src/test/java/org/apache/shardingsphere/single/distsql/handler/update/LoadSingleTableStatementUpdaterTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.dialect.exception.syntax.table.TableExistsException;
import org.apache.shardingsphere.distsql.handler.exception.storageunit.MissingRequiredStorageUnitsException;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
import org.apache.shardingsphere.infra.rule.identifier.type.DataSourceContainedRule;
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationDataTypeUtils.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationDataTypeUtils.java
index d7d37c52474c7..0c8aaa12dc9e0 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationDataTypeUtils.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/metadata/util/SQLFederationDataTypeUtils.java
@@ -24,7 +24,7 @@
import org.apache.calcite.rel.type.RelDataTypeFactory;
import org.apache.calcite.rel.type.RelDataTypeFactory.Builder;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
index d8f0e01f4a3d5..5ddb1c969b861 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/executor/enumerable/EnumerableScanExecutor.java
@@ -28,7 +28,7 @@
import org.apache.shardingsphere.infra.connection.kernel.KernelProcessor;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.database.DatabaseTypeEngine;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupReportContext;
diff --git a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java
index 9c70bb9982cd8..e42366a6585ab 100644
--- a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java
+++ b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java
@@ -29,7 +29,7 @@
import org.apache.calcite.sql2rel.SqlToRelConverter;
import org.apache.shardingsphere.infra.database.DatabaseTypeEngine;
import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn;
import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
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 1f8604b01c0c9..ab89cc0d5686e 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
@@ -22,7 +22,7 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics;
diff --git a/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/rule/SQLTranslatorRuleTest.java b/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/rule/SQLTranslatorRuleTest.java
index 9a7d57dded253..ca00985083ed8 100644
--- a/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/rule/SQLTranslatorRuleTest.java
+++ b/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/rule/SQLTranslatorRuleTest.java
@@ -17,8 +17,8 @@
package org.apache.shardingsphere.sqltranslator.rule;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.sqltranslator.api.config.SQLTranslatorRuleConfiguration;
import org.apache.shardingsphere.sqltranslator.exception.syntax.UnsupportedTranslatedDatabaseException;
import org.junit.jupiter.api.Test;
diff --git a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/ConnectionSavepointManager.java b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/ConnectionSavepointManager.java
index 9dcd59f6ffd07..0a7cfff02596c 100644
--- a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/ConnectionSavepointManager.java
+++ b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/ConnectionSavepointManager.java
@@ -20,7 +20,7 @@
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import java.sql.Connection;
import java.sql.SQLException;
diff --git a/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/rule/TransactionRuleTest.java b/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/rule/TransactionRuleTest.java
index 92cf42a400052..d104d63df13bd 100644
--- a/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/rule/TransactionRuleTest.java
+++ b/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/rule/TransactionRuleTest.java
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.transaction.rule;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
import org.apache.shardingsphere.test.fixture.jdbc.MockedDataSource;
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 9d1fb71417a1f..f9bf86a3d64ea 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
@@ -22,7 +22,7 @@
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.datasource.props.DataSourceProperties;
import org.apache.shardingsphere.infra.datasource.storage.StorageUtils;
diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/ClusterModeContextManagerTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/ClusterModeContextManagerTest.java
index 96f355281b228..9675816ab3e07 100644
--- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/ClusterModeContextManagerTest.java
+++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/ClusterModeContextManagerTest.java
@@ -20,8 +20,8 @@
import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datasource.props.DataSourceProperties;
import org.apache.shardingsphere.infra.instance.ComputeNodeInstance;
import org.apache.shardingsphere.infra.instance.InstanceContext;
@@ -64,12 +64,10 @@ void assertCreateDatabase() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.createDatabase("db"));
}
@@ -80,12 +78,10 @@ void assertDropDatabase() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.dropDatabase("db"));
}
@@ -96,12 +92,10 @@ void assertCreateSchema() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.createSchema("db", "Schema Name"));
}
@@ -109,15 +103,12 @@ void assertCreateSchema() {
void assertAlterSchema() {
ShardingSphereMetaData shardingSphereMetaData = new ShardingSphereMetaData();
shardingSphereMetaData.addDatabase("db", new H2DatabaseType(), new ConfigurationProperties(new Properties()));
- MetaDataContexts metaDataContexts = new MetaDataContexts(
- new MetaDataPersistService(new ClusterPersistRepositoryFixture()), shardingSphereMetaData);
+ MetaDataContexts metaDataContexts = new MetaDataContexts(new MetaDataPersistService(new ClusterPersistRepositoryFixture()), shardingSphereMetaData);
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- ContextManager contextManager = new ContextManager(metaDataContexts, new InstanceContext(instance,
- workerIdGenerator, modeConfiguration, modeContextManager, null, new EventBusContext()));
+ ContextManager contextManager = new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext()));
contextManager.getResourceMetaDataContextManager().addSchema("db", "Schema Name");
ClusterModeContextManager clusterModeContextManager = new ClusterModeContextManager();
clusterModeContextManager.setContextManagerAware(contextManager);
@@ -131,11 +122,10 @@ void assertDropSchema() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager.setContextManagerAware(
- new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfiguration, modeContextManager, null, new EventBusContext())));
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.dropSchema("db", new LinkedList<>()));
}
@@ -146,15 +136,11 @@ void assertDropSchemaWithEmptyList() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
- Collection stringList = new LinkedList<>();
- stringList.add("foo");
- assertDoesNotThrow(() -> clusterModeContextManager.dropSchema("db", stringList));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
+ assertDoesNotThrow(() -> clusterModeContextManager.dropSchema("db", Collections.singleton("foo")));
}
@Test
@@ -164,12 +150,10 @@ void assertDropSchemaWithListContainingRootAndNonRoot() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
Collection stringList = new LinkedList<>();
stringList.add("/");
stringList.add("foo");
@@ -183,12 +167,10 @@ void assertAlterSchemaMetaData() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
AlterSchemaMetaDataPOJO alterSchemaMetaDataPOJO = new AlterSchemaMetaDataPOJO("db", "Schema Name");
clusterModeContextManager.alterSchemaMetaData(alterSchemaMetaDataPOJO);
assertNull(alterSchemaMetaDataPOJO.getLogicDataSourceName());
@@ -201,12 +183,10 @@ void assertRegisterStorageUnits() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
- new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
+ ModeConfiguration modeConfig = new ModeConfiguration("Type", new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- clusterModeContextManager
- .setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ clusterModeContextManager.setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.registerStorageUnits("db", new TreeMap<>()));
}
@@ -217,12 +197,12 @@ void assertAlterStorageUnits() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.alterStorageUnits("db", new TreeMap<>()));
}
@@ -234,12 +214,12 @@ void assertAlterStorageUnitsWithProcessListClusterPerRepoFix() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.alterStorageUnits("db", new TreeMap<>()));
}
@@ -250,12 +230,12 @@ void assertAlterStorageUnitsWithDataSourceProperties() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Map stringDataSourcePropertiesMap = new HashMap<>();
stringDataSourcePropertiesMap.put("active_version", new DataSourceProperties("active_version", new HashMap<>()));
assertDoesNotThrow(() -> clusterModeContextManager.alterStorageUnits("db", stringDataSourcePropertiesMap));
@@ -268,12 +248,12 @@ void assertAlterStorageUnitsInvalidName() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Map stringDataSourcePropertiesMap = new HashMap<>();
stringDataSourcePropertiesMap.put("\n", new DataSourceProperties("\n", new HashMap<>()));
stringDataSourcePropertiesMap.put("active_version", new DataSourceProperties("active_version", new HashMap<>()));
@@ -291,12 +271,12 @@ void assertAlterStorageUnitsWithoutDataSourceProperties() {
new ShardingSphereMetaData(databases, mock(ShardingSphereResourceMetaData.class), globalRuleMetaData, new ConfigurationProperties(new Properties())));
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.alterStorageUnits("db", new TreeMap<>()));
}
@@ -308,12 +288,12 @@ void assertAlterStorageUnitsWithEmptyDataSourcePropertiesMap() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Map stringDataSourcePropertiesMap = new HashMap<>(new TreeMap<>());
assertDoesNotThrow(() -> clusterModeContextManager.alterStorageUnits("db", stringDataSourcePropertiesMap));
}
@@ -326,12 +306,12 @@ void assertAlterStorageUnitsWithOneDataSourceProperties() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Map stringDataSourcePropertiesMap = new HashMap<>();
stringDataSourcePropertiesMap.put("42", new DataSourceProperties("active_version", new HashMap<>()));
assertDoesNotThrow(() -> clusterModeContextManager.alterStorageUnits("db", stringDataSourcePropertiesMap));
@@ -344,12 +324,12 @@ void assertUnregisterStorageUnits() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, createShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.unregisterStorageUnits("db", new LinkedList<>()));
}
@@ -361,12 +341,12 @@ void assertUnregisterStorageUnitsWithProcessListClusterPersistRepoFixture() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, createShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.unregisterStorageUnits("db", new LinkedList<>()));
}
@@ -392,12 +372,12 @@ void assertAlterRuleConfiguration() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, createShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Collection ruleConfigurationList = new LinkedList<>();
ruleConfigurationList.add(new RuleConfigurationFixture());
assertDoesNotThrow(() -> clusterModeContextManager.alterRuleConfiguration("db", ruleConfigurationList));
@@ -416,12 +396,12 @@ void assertAlterRuleConfigurationMultiple() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, createShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Collection ruleConfigurationList = new LinkedList<>();
ruleConfigurationList.add(new RuleConfigurationFixture());
ruleConfigurationList.add(new RuleConfigurationFixture());
@@ -436,12 +416,12 @@ void assertAlterRuleConfigurationWithPersistService() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, createShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Collection ruleConfigurationList = new LinkedList<>();
ruleConfigurationList.add(new RuleConfigurationFixture());
assertDoesNotThrow(() -> clusterModeContextManager.alterRuleConfiguration("db", ruleConfigurationList));
@@ -454,12 +434,12 @@ void assertAlterGlobalRuleConfigurationWithEmptyRuleConfigurations() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, createShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.alterGlobalRuleConfiguration(new LinkedList<>()));
}
@@ -470,12 +450,12 @@ void assertAlterGlobalRuleConfigurationWithSingleRuleConfigurations() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Collection ruleConfigurationList = new LinkedList<>();
ruleConfigurationList.add(new RuleConfigurationFixture());
assertDoesNotThrow(() -> clusterModeContextManager.alterGlobalRuleConfiguration(ruleConfigurationList));
@@ -488,12 +468,12 @@ void assertAlterGlobalRuleConfigurationWithMultipleRuleConfigurations() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
Collection ruleConfigurationList = new LinkedList<>();
ruleConfigurationList.add(new RuleConfigurationFixture());
ruleConfigurationList.add(new RuleConfigurationFixture());
@@ -507,27 +487,26 @@ void assertAlterProperties() {
MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData());
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
clusterModeContextManager
.setContextManagerAware(new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator,
- modeConfiguration, modeContextManager, null, new EventBusContext())));
+ modeConfig, modeContextManager, null, new EventBusContext())));
assertDoesNotThrow(() -> clusterModeContextManager.alterProperties(new Properties()));
}
@Test
void assertConstructor() {
- ClusterModeContextManager actualClusterModeContextManager = new ClusterModeContextManager();
MetaDataPersistService persistService = new MetaDataPersistService(new ClusterPersistRepositoryFixture());
try (MetaDataContexts metaDataContexts = new MetaDataContexts(persistService, new ShardingSphereMetaData())) {
ComputeNodeInstance instance = new ComputeNodeInstance(new JDBCInstanceMetaData("42"));
WorkerIdGenerator workerIdGenerator = mock(WorkerIdGenerator.class);
- ModeConfiguration modeConfiguration = new ModeConfiguration("Type",
+ ModeConfiguration modeConfig = new ModeConfiguration("Type",
new ClusterPersistRepositoryConfiguration("Type", "Namespace", "Server Lists", new Properties()));
ClusterModeContextManager modeContextManager = new ClusterModeContextManager();
- assertDoesNotThrow(() -> actualClusterModeContextManager.setContextManagerAware(
- new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfiguration, modeContextManager, null, new EventBusContext()))));
+ assertDoesNotThrow(() -> new ClusterModeContextManager().setContextManagerAware(
+ new ContextManager(metaDataContexts, new InstanceContext(instance, workerIdGenerator, modeConfig, modeContextManager, null, new EventBusContext()))));
}
}
}
diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
index ba14fdbaed7ed..8d6e2b9189dab 100644
--- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
+++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.process.Process;
import org.apache.shardingsphere.infra.executor.sql.process.ProcessRegistry;
import org.apache.shardingsphere.infra.executor.sql.process.lock.ProcessOperationLockRegistry;
diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriberTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriberTest.java
index 66578345dd8b5..1182281c69412 100644
--- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriberTest.java
+++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ConfigurationChangedSubscriberTest.java
@@ -24,7 +24,7 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datasource.props.DataSourceProperties;
import org.apache.shardingsphere.infra.datasource.props.DataSourcePropertiesCreator;
import org.apache.shardingsphere.infra.instance.metadata.InstanceMetaData;
diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java
index bcbb5726eab7a..8ce0fd287bb65 100644
--- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java
+++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datasource.props.DataSourceProperties;
import org.apache.shardingsphere.infra.datasource.props.DataSourcePropertiesCreator;
import org.apache.shardingsphere.infra.instance.metadata.InstanceMetaData;
diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java
index 967ab962635d7..d521e8f3c29a9 100644
--- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java
+++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datasource.state.DataSourceState;
import org.apache.shardingsphere.infra.instance.ComputeNodeInstance;
import org.apache.shardingsphere.infra.instance.metadata.InstanceMetaData;
diff --git a/parser/distsql/statement/src/test/java/org/apache/shardingsphere/distsql/parser/segment/converter/DataSourceSegmentsConverterTest.java b/parser/distsql/statement/src/test/java/org/apache/shardingsphere/distsql/parser/segment/converter/DataSourceSegmentsConverterTest.java
index 9b0af7062b696..b3b3b3c27b2a5 100644
--- a/parser/distsql/statement/src/test/java/org/apache/shardingsphere/distsql/parser/segment/converter/DataSourceSegmentsConverterTest.java
+++ b/parser/distsql/statement/src/test/java/org/apache/shardingsphere/distsql/parser/segment/converter/DataSourceSegmentsConverterTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.distsql.parser.segment.DataSourceSegment;
import org.apache.shardingsphere.distsql.parser.segment.HostnameAndPortBasedDataSourceSegment;
import org.apache.shardingsphere.distsql.parser.segment.URLBasedDataSourceSegment;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.datasource.props.DataSourceProperties;
import org.apache.shardingsphere.test.util.PropertiesBuilder;
import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java
index 486cb7b6150ad..67982765f09fb 100644
--- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java
+++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/transaction/TransactionBackendHandler.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.handler.transaction;
import org.apache.shardingsphere.dialect.exception.transaction.InTransactionException;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import org.apache.shardingsphere.proxy.backend.connector.TransactionManager;
import org.apache.shardingsphere.proxy.backend.connector.jdbc.transaction.BackendTransactionManager;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnectorFactoryTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnectorFactoryTest.java
index 3c7b79de40de9..2db3620bdcb6b 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnectorFactoryTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnectorFactoryTest.java
@@ -21,7 +21,7 @@
import org.apache.shardingsphere.infra.session.query.QueryContext;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/ProxySQLExecutorTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/ProxySQLExecutorTest.java
index 81a114302a56a..236a36056d2b0 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/ProxySQLExecutorTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/ProxySQLExecutorTest.java
@@ -27,7 +27,7 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
import org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.JDBCDriverType;
import org.apache.shardingsphere.infra.instance.InstanceContext;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/datasource/JDBCBackendDataSourceTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/datasource/JDBCBackendDataSourceTest.java
index a7f17a421adc3..752072247feb0 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/datasource/JDBCBackendDataSourceTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/datasource/JDBCBackendDataSourceTest.java
@@ -20,7 +20,7 @@
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.exception.OverallConnectionNotEnoughException;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java
index ad45c10eb2c3a..e89c95c15a321 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.dialect.exception.syntax.database.NoDatabaseSelectedException;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.instance.InstanceContext;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/executor/DefaultDatabaseMetaDataExecutorTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/executor/DefaultDatabaseMetaDataExecutorTest.java
index 951c1c49fda6a..ecfbda1ca1257 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/executor/DefaultDatabaseMetaDataExecutorTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/executor/DefaultDatabaseMetaDataExecutorTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.authority.provider.database.model.privilege.DatabasePermittedPrivileges;
import org.apache.shardingsphere.authority.rule.AuthorityRule;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandlerTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandlerTest.java
index 89e099b69c2e9..61824f6160a9c 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandlerTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/data/impl/UnicastDatabaseBackendHandlerTest.java
@@ -22,7 +22,7 @@
import org.apache.shardingsphere.infra.session.query.QueryContext;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DatabaseOperateBackendHandlerFactoryTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DatabaseOperateBackendHandlerFactoryTest.java
index 45b085532ef7f..75c4dc970dae9 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DatabaseOperateBackendHandlerFactoryTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/database/DatabaseOperateBackendHandlerFactoryTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.dialect.exception.syntax.database.DatabaseCreateExistsException;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ConvertYamlConfigurationExecutorTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ConvertYamlConfigurationExecutorTest.java
index 0773ed5fc13f3..2a53ee43cccd7 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ConvertYamlConfigurationExecutorTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ConvertYamlConfigurationExecutorTest.java
@@ -21,7 +21,7 @@
import com.google.common.base.Strings;
import lombok.SneakyThrows;
import org.apache.shardingsphere.distsql.parser.statement.ral.queryable.ConvertYamlConfigurationStatement;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow;
import org.apache.shardingsphere.parser.rule.SQLParserRule;
import org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdatableRALBackendHandlerTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdatableRALBackendHandlerTest.java
index de7ce01a98836..c02d1c4c30573 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdatableRALBackendHandlerTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/SetDistVariableUpdatableRALBackendHandlerTest.java
@@ -19,7 +19,7 @@
import io.netty.util.DefaultAttributeMap;
import org.apache.shardingsphere.distsql.parser.statement.ral.updatable.SetDistVariableStatement;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.proxy.backend.exception.UnsupportedVariableException;
import org.apache.shardingsphere.proxy.backend.handler.distsql.ral.UpdatableRALBackendHandler;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/rule/RuleDefinitionBackendHandlerTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/rule/RuleDefinitionBackendHandlerTest.java
index 1a24c28f25e7e..40c8a41edb014 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/rule/RuleDefinitionBackendHandlerTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/rule/RuleDefinitionBackendHandlerTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.handler.distsql.rdl.rule;
import io.netty.util.DefaultAttributeMap;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.mode.manager.ContextManager;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/AlterStorageUnitBackendHandlerTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/AlterStorageUnitBackendHandlerTest.java
index 0e2303997b1e3..5b465508d97f0 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/AlterStorageUnitBackendHandlerTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/AlterStorageUnitBackendHandlerTest.java
@@ -26,7 +26,7 @@
import org.apache.shardingsphere.distsql.parser.segment.HostnameAndPortBasedDataSourceSegment;
import org.apache.shardingsphere.distsql.parser.segment.URLBasedDataSourceSegment;
import org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterStorageUnitStatement;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
import org.apache.shardingsphere.mode.manager.ContextManager;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/RegisterStorageUnitBackendHandlerTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/RegisterStorageUnitBackendHandlerTest.java
index 5d86357ca88d4..9293fb227a915 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/RegisterStorageUnitBackendHandlerTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/storage/unit/RegisterStorageUnitBackendHandlerTest.java
@@ -24,7 +24,7 @@
import org.apache.shardingsphere.distsql.parser.segment.HostnameAndPortBasedDataSourceSegment;
import org.apache.shardingsphere.distsql.parser.segment.URLBasedDataSourceSegment;
import org.apache.shardingsphere.distsql.parser.statement.rdl.create.RegisterStorageUnitStatement;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.infra.rule.identifier.type.DataSourceContainedRule;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/FormatSQLExecutorTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/FormatSQLExecutorTest.java
index ece6e9f11fe66..de5b276da5e54 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/FormatSQLExecutorTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/FormatSQLExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.handler.distsql.rul.sql;
import org.apache.shardingsphere.distsql.parser.statement.rul.sql.FormatStatement;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.apache.shardingsphere.proxy.backend.handler.distsql.rul.RULBackendHandler;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/ParseDistSQLExecutorTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/ParseDistSQLExecutorTest.java
index 24a5257be3867..492449bd57f33 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/ParseDistSQLExecutorTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rul/sql/ParseDistSQLExecutorTest.java
@@ -21,8 +21,8 @@
import com.google.gson.JsonParser;
import org.apache.shardingsphere.distsql.parser.statement.rul.sql.FormatStatement;
import org.apache.shardingsphere.distsql.parser.statement.rul.sql.ParseStatement;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.parser.rule.SQLParserRule;
diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSessionTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSessionTest.java
index 366fb36fcdcd7..63cd6f0cf4d12 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSessionTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/session/ConnectionSessionTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.session;
import org.apache.shardingsphere.infra.session.query.QueryContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.proxy.backend.connector.ProxyDatabaseConnectionManager;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowCreateDatabaseExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowCreateDatabaseExecutorTest.java
index 739a79a70a872..f09ac4ebc292e 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowCreateDatabaseExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowCreateDatabaseExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowDatabasesExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowDatabasesExecutorTest.java
index 54f711e9674b0..8ffaa0e45ecdc 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowDatabasesExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowDatabasesExecutorTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.authority.provider.simple.model.privilege.AllPrivilegesPermittedShardingSpherePrivileges;
import org.apache.shardingsphere.authority.rule.AuthorityRule;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowFunctionStatusExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowFunctionStatusExecutorTest.java
index 05d481972a37f..628aabe43650b 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowFunctionStatusExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowFunctionStatusExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcedureStatusExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcedureStatusExecutorTest.java
index bca444bc50498..f0c2da5031885 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcedureStatusExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcedureStatusExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutorTest.java
index 0f8e11d46c19c..85dbdac9aa2ec 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor;
import io.netty.util.DefaultAttributeMap;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.process.Process;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
import org.apache.shardingsphere.mode.manager.ContextManager;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowTablesExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowTablesExecutorTest.java
index 4f552e3c460d5..1d218aff3d26d 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowTablesExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowTablesExecutorTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.result.query.QueryResultMetaData;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/UseDatabaseExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/UseDatabaseExecutorTest.java
index ff19b16ea0b00..2ff9e90625969 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/UseDatabaseExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/UseDatabaseExecutorTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.dialect.exception.syntax.database.UnknownDatabaseException;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutorTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutorTest.java
index 5d0be18133c48..a2360c351832b 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutorTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutorTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.authority.provider.database.model.privilege.DatabasePermittedPrivileges;
import org.apache.shardingsphere.authority.rule.AuthorityRule;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionIsolationValueProviderTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionIsolationValueProviderTest.java
index 87db219a2ada9..084b0231958f4 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionIsolationValueProviderTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionIsolationValueProviderTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.provider;
import io.netty.util.DefaultAttributeMap;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.Scope;
import org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.MySQLSystemVariable;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionReadOnlyValueProviderTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionReadOnlyValueProviderTest.java
index 2e8f5e5d00de8..282d6b473d1a2 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionReadOnlyValueProviderTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/TransactionReadOnlyValueProviderTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.provider;
import io.netty.util.DefaultAttributeMap;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.Scope;
import org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.MySQLSystemVariable;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
diff --git a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/VersionValueProviderTest.java b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/VersionValueProviderTest.java
index 45cb2c33482b5..e2afbc67745d2 100644
--- a/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/VersionValueProviderTest.java
+++ b/proxy/backend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/sysvar/provider/VersionValueProviderTest.java
@@ -20,7 +20,7 @@
import io.netty.util.DefaultAttributeMap;
import org.apache.shardingsphere.db.protocol.constant.DatabaseProtocolServerInfo;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.MySQLSystemVariable;
import org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.sysvar.Scope;
diff --git a/proxy/backend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/backend/opengauss/handler/admin/OpenGaussSystemCatalogAdminQueryExecutorTest.java b/proxy/backend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/backend/opengauss/handler/admin/OpenGaussSystemCatalogAdminQueryExecutorTest.java
index 42bf8b52cc558..0fb98bf1d067c 100644
--- a/proxy/backend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/backend/opengauss/handler/admin/OpenGaussSystemCatalogAdminQueryExecutorTest.java
+++ b/proxy/backend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/backend/opengauss/handler/admin/OpenGaussSystemCatalogAdminQueryExecutorTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.result.query.QueryResultMetaData;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
diff --git a/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java b/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java
index 474afcd7a104d..9686b9b5c3458 100644
--- a/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java
+++ b/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactoryTest.java
@@ -20,7 +20,7 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.instance.InstanceContext;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
diff --git a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java
index 0ba624832376f..78e67a0d1fee7 100644
--- a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java
+++ b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java
@@ -32,7 +32,7 @@
import org.apache.shardingsphere.infra.binder.statement.UnknownSQLStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.UpdateStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.session.query.QueryContext;
import org.apache.shardingsphere.proxy.backend.connector.ProxyDatabaseConnectionManager;
diff --git a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
index c10d8e603b796..7f48cfce33445 100644
--- a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
+++ b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutorTest.java
@@ -32,7 +32,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.UpdateStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResourceMetaData;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
index 7e85738928d19..f95e0f59d9acc 100644
--- a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
+++ b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLComQueryPacketExecutorTest.java
@@ -24,7 +24,7 @@
import org.apache.shardingsphere.db.protocol.mysql.packet.generic.MySQLOKPacket;
import org.apache.shardingsphere.db.protocol.packet.DatabasePacket;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.logging.rule.LoggingRule;
diff --git a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLMultiStatementsHandlerTest.java b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLMultiStatementsHandlerTest.java
index 673a99fd384d0..695294d8e16bf 100644
--- a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLMultiStatementsHandlerTest.java
+++ b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/text/query/MySQLMultiStatementsHandlerTest.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
diff --git a/proxy/frontend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java b/proxy/frontend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java
index d305682476250..64ddbbb922324 100644
--- a/proxy/frontend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java
+++ b/proxy/frontend/type/opengauss/src/test/java/org/apache/shardingsphere/proxy/frontend/opengauss/command/query/extended/bind/OpenGaussComBatchBindExecutorTest.java
@@ -25,7 +25,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption;
diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PortalTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PortalTest.java
index 640d122d3a0d0..e835429ccd731 100644
--- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PortalTest.java
+++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PortalTest.java
@@ -33,7 +33,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.session.query.QueryContext;
diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java
index e949da8e780e7..4fe6e82c73091 100644
--- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java
+++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLAggregatedBatchedStatementsCommandExecutorTest.java
@@ -30,7 +30,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption;
diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutorTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutorTest.java
index 919ada2c3a320..44a59d80e0b43 100644
--- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutorTest.java
+++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/PostgreSQLBatchedStatementsExecutorTest.java
@@ -23,7 +23,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.StatementOption;
diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/bind/PostgreSQLComBindExecutorTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/bind/PostgreSQLComBindExecutorTest.java
index f157c24419b3f..12ff375d15474 100644
--- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/bind/PostgreSQLComBindExecutorTest.java
+++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/bind/PostgreSQLComBindExecutorTest.java
@@ -22,7 +22,7 @@
import org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.extended.bind.PostgreSQLBindCompletePacket;
import org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.extended.bind.PostgreSQLComBindPacket;
import org.apache.shardingsphere.infra.binder.statement.UnknownSQLStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.mode.manager.ContextManager;
diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java
index d2e9765acede0..d15543950c9de 100644
--- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java
+++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java
@@ -31,7 +31,7 @@
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
index 7cbf8466de9c0..452d1f4fa759c 100644
--- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
+++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/parse/PostgreSQLComParseExecutorTest.java
@@ -24,7 +24,7 @@
import org.apache.shardingsphere.distsql.parser.statement.ral.queryable.ShowDistVariableStatement;
import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext;
import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.parser.rule.SQLParserRule;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
index f534f937ec3cf..4e6134be9c9b3 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
@@ -28,9 +28,9 @@
import org.apache.shardingsphere.data.pipeline.common.job.type.JobType;
import org.apache.shardingsphere.infra.database.core.metadata.url.JdbcUrlAppender;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
import org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/CDCE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/CDCE2EIT.java
index bcdc196aafeb8..b89598b7feafa 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/CDCE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/CDCE2EIT.java
@@ -36,9 +36,9 @@
import org.apache.shardingsphere.data.pipeline.core.consistencycheck.SingleTableInventoryDataConsistencyChecker;
import org.apache.shardingsphere.data.pipeline.core.consistencycheck.algorithm.DataMatchDataConsistencyCalculateAlgorithm;
import org.apache.shardingsphere.data.pipeline.core.consistencycheck.result.DataConsistencyCheckResult;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.task.E2EIncrementalTask;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
index b2e592427eedb..d0a925a622e61 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
@@ -19,9 +19,9 @@
import org.apache.shardingsphere.data.pipeline.spi.ddlgenerator.CreateTableSQLGenerator;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.spi.DatabaseTypedSPILoader;
import org.apache.shardingsphere.test.e2e.data.pipeline.entity.CreateTableSQLGeneratorAssertionEntity;
import org.apache.shardingsphere.test.e2e.data.pipeline.entity.CreateTableSQLGeneratorAssertionsRootEntity;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java
index b6bc302c7e2ce..d49d7f5021586 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java
@@ -20,8 +20,8 @@
import com.google.common.base.Strings;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.command.MigrationDistSQLCommand;
import org.apache.shardingsphere.test.e2e.data.pipeline.env.PipelineE2EEnvironment;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
index fe11c1d0c8ee7..9ded13104a19c 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
@@ -20,7 +20,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLTimeTypesMigrationE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLTimeTypesMigrationE2EIT.java
index 5f89b3754af40..2f2fd24ad5812 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLTimeTypesMigrationE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLTimeTypesMigrationE2EIT.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.general;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineE2ECondition;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
index ce17df8cb0216..3b3e28e20ed49 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
@@ -20,8 +20,8 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/RulesMigrationE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/RulesMigrationE2EIT.java
index 950eb97d21ae5..72ba608f9e008 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/RulesMigrationE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/RulesMigrationE2EIT.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.general;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/IndexesMigrationE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/IndexesMigrationE2EIT.java
index e5901d7a75bfe..00dadc2bc2d62 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/IndexesMigrationE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/IndexesMigrationE2EIT.java
@@ -20,8 +20,8 @@
import lombok.SneakyThrows;
import org.apache.commons.codec.binary.Hex;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.util.exception.external.sql.type.wrapper.SQLWrapperException;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
import org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/MariaDBMigrationE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/MariaDBMigrationE2EIT.java
index 30b89c9103fba..43eef5c2f92b4 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/MariaDBMigrationE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/MariaDBMigrationE2EIT.java
@@ -19,7 +19,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
index 49eab8703fc36..1a14f000a5cfc 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
@@ -18,9 +18,9 @@
package org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.primarykey;
import org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.PipelineContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
index 2d15d723c13ad..7943ee4f2f06d 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
@@ -21,9 +21,9 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseIncrementTask;
import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.PipelineCaseHelper;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
index 079953864a7c4..4dcd0c58d19c9 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
@@ -19,7 +19,7 @@
import lombok.Getter;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.config.proxy.PipelineProxyClusterContainerConfigurationFactory;
import org.apache.shardingsphere.test.e2e.data.pipeline.util.DockerImageVersion;
import org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.AdapterContainerFactory;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java
index 1eb2c7e807b89..f4b1a15bde4e7 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java
@@ -20,9 +20,9 @@
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.config.AdaptorContainerConfiguration;
import org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.config.ProxyClusterContainerConfigurationFactory;
import org.apache.shardingsphere.test.e2e.env.container.atomic.constants.ProxyContainerConstants;
diff --git a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java
index b223062972d88..13afab60011c3 100644
--- a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java
+++ b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java
@@ -25,9 +25,9 @@
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
import org.apache.shardingsphere.test.e2e.data.pipeline.util.AutoIncrementKeyGenerateAlgorithm;
diff --git a/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/showprocesslist/engine/ShowProcessListE2EIT.java b/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/showprocesslist/engine/ShowProcessListE2EIT.java
index 6d49933226aaf..8b8b84e151a0c 100644
--- a/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/showprocesslist/engine/ShowProcessListE2EIT.java
+++ b/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/showprocesslist/engine/ShowProcessListE2EIT.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.test.e2e.showprocesslist.engine;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.apache.shardingsphere.test.e2e.showprocesslist.container.composer.ClusterShowProcessListContainerComposer;
import org.apache.shardingsphere.test.e2e.showprocesslist.env.ShowProcessListEnvironment;
import org.apache.shardingsphere.test.e2e.showprocesslist.env.enums.ShowProcessListEnvTypeEnum;
@@ -54,7 +54,7 @@ class ShowProcessListE2EIT {
@ParameterizedTest(name = "{0}")
@EnabledIf("isEnabled")
@ArgumentsSource(TestCaseArgumentsProvider.class)
- void assertShowProcessList(final ShowProcessListTestParameter testParam) throws SQLException, InterruptedException {
+ void assertShowProcessList(final ShowProcessListTestParameter testParam) throws SQLException {
try (ClusterShowProcessListContainerComposer containerComposer = new ClusterShowProcessListContainerComposer(testParam)) {
containerComposer.start();
CompletableFuture executeSelectSleep = CompletableFuture.runAsync(getExecuteSleepThread("proxy", containerComposer));
diff --git a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
index 3f0c729a68240..e9bf2b9afc337 100644
--- a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
+++ b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
@@ -21,9 +21,9 @@
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
import org.apache.shardingsphere.test.e2e.env.container.atomic.storage.DockerStorageContainer;
import org.apache.shardingsphere.test.e2e.env.runtime.DataSourceEnvironment;
diff --git a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/proxy/ProxyClusterContainerConfigurationFactory.java b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/proxy/ProxyClusterContainerConfigurationFactory.java
index dab0ce7eec46e..add0e54c73e42 100644
--- a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/proxy/ProxyClusterContainerConfigurationFactory.java
+++ b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/proxy/ProxyClusterContainerConfigurationFactory.java
@@ -20,8 +20,8 @@
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.config.AdaptorContainerConfiguration;
import org.apache.shardingsphere.test.e2e.env.container.atomic.constants.ProxyContainerConstants;
import org.apache.shardingsphere.test.e2e.env.container.atomic.util.AdapterContainerUtils;
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/DataSetEnvironmentManager.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/DataSetEnvironmentManager.java
index 23e854061ba76..267c09d52d167 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/DataSetEnvironmentManager.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/DataSetEnvironmentManager.java
@@ -20,8 +20,8 @@
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory;
-import org.apache.shardingsphere.infra.database.core.type.dialect.OpenGaussDatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.PostgreSQLDatabaseType;
+import org.apache.shardingsphere.infra.database.opengauss.OpenGaussDatabaseType;
+import org.apache.shardingsphere.infra.database.postgresql.PostgreSQLDatabaseType;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithmTest.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithmTest.java
index 0f0c09a4c497a..9a3cf929a8129 100644
--- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithmTest.java
+++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/algorithm/DataMatchDataConsistencyCalculateAlgorithmTest.java
@@ -24,7 +24,7 @@
import org.apache.shardingsphere.data.pipeline.core.consistencycheck.algorithm.DataMatchDataConsistencyCalculateAlgorithm;
import org.apache.shardingsphere.data.pipeline.core.consistencycheck.result.DataConsistencyCalculatedResult;
import org.apache.shardingsphere.infra.database.spi.DatabaseType;
-import org.apache.shardingsphere.infra.database.core.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.h2.H2DatabaseType;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.test.util.PropertiesBuilder;
import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
diff --git a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/dump/ColumnValueReaderEngineTest.java b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/dump/ColumnValueReaderEngineTest.java
index a3d9d9658c638..60e80984ce2b6 100644
--- a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/dump/ColumnValueReaderEngineTest.java
+++ b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/dump/ColumnValueReaderEngineTest.java
@@ -20,7 +20,7 @@
import com.zaxxer.hikari.HikariDataSource;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.shardingsphere.data.pipeline.core.dumper.ColumnValueReaderEngine;
-import org.apache.shardingsphere.infra.database.core.type.dialect.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.mysql.MySQLDatabaseType;
import org.junit.jupiter.api.Test;
import java.sql.Connection;