This is an automated email from the ASF dual-hosted git repository. zhangliang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push: new 10c46c4dcaf Refactor StandardPipelineTableMetaDataLoader (#35308) 10c46c4dcaf is described below commit 10c46c4dcafd72a4f7461def1f1e4514267e8bc9 Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Fri May 2 20:53:40 2025 +0800 Refactor StandardPipelineTableMetaDataLoader (#35308) --- .../core/metadata/loader/StandardPipelineTableMetaDataLoader.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoader.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoader.java index 2b2cccf2060..3454e3cffe1 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoader.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoader.java @@ -25,7 +25,6 @@ import org.apache.shardingsphere.data.pipeline.core.exception.PipelineInternalEx import org.apache.shardingsphere.data.pipeline.core.metadata.model.PipelineColumnMetaData; import org.apache.shardingsphere.data.pipeline.core.metadata.model.PipelineIndexMetaData; import org.apache.shardingsphere.data.pipeline.core.metadata.model.PipelineTableMetaData; -import org.apache.shardingsphere.infra.database.core.metadata.database.metadata.DialectDatabaseMetaData; import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeRegistry; import org.apache.shardingsphere.infra.metadata.identifier.ShardingSphereIdentifier; @@ -73,8 +72,8 @@ public final class StandardPipelineTableMetaDataLoader implements PipelineTableM private void loadTableMetaData(final String schemaName, final String tableName) throws SQLException { try (Connection connection = dataSource.getConnection()) { - DialectDatabaseMetaData dialectDatabaseMetaData = new DatabaseTypeRegistry(dataSource.getDatabaseType()).getDialectDatabaseMetaData(); - tableMetaDataMap.putAll(loadTableMetaData(connection, dialectDatabaseMetaData.getSchemaOption().isSchemaAvailable() ? schemaName : null, tableName)); + DatabaseTypeRegistry databaseTypeRegistry = new DatabaseTypeRegistry(dataSource.getDatabaseType()); + tableMetaDataMap.putAll(loadTableMetaData(connection, databaseTypeRegistry.getDialectDatabaseMetaData().getSchemaOption().isSchemaAvailable() ? schemaName : null, tableName)); } }