You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/09/23 09:55:31 UTC

[shardingsphere] branch master updated: Change zk table meta data name change to logic. (#12655)

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

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 0720668  Change zk table meta data name change to logic. (#12655)
0720668 is described below

commit 07206689632230df207da0add4cd738bb1bf542f
Author: tuichenchuxin <86...@users.noreply.github.com>
AuthorDate: Thu Sep 23 17:54:58 2021 +0800

    Change zk table meta data name change to logic. (#12655)
---
 .../shardingsphere/infra/metadata/schema/loader/SchemaLoader.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/SchemaLoader.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/SchemaLoader.java
index 7003aa4..b9864ed 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/SchemaLoader.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/loader/SchemaLoader.java
@@ -69,8 +69,8 @@ public final class SchemaLoader {
             Collection<RuleConfiguration> ruleConfigs = schemaRuleConfigs.get(each);
             DatabaseType databaseType = DatabaseTypeRecognizer.getDatabaseType(dataSources.get(each).values());
             Collection<ShardingSphereRule> rules = SchemaRulesBuilder.buildRules(new SchemaRulesBuilderMaterials(each, ruleConfigs, databaseType, dataSourceMap, props));
-            Collection<TableMetaData> tableMetaDatas = TableMetaDataBuilder.load(getAllTableNames(rules), new SchemaBuilderMaterials(databaseType, dataSourceMap, rules, props)).values();
-            result.put(each, new ShardingSphereSchema(tableMetaDatas.stream().collect(Collectors.toMap(TableMetaData::getName, tableMetaData -> tableMetaData))));
+            Map<String, TableMetaData> tableMetaDataMap = TableMetaDataBuilder.load(getAllTableNames(rules), new SchemaBuilderMaterials(databaseType, dataSourceMap, rules, props));
+            result.put(each, new ShardingSphereSchema(tableMetaDataMap));
         }
         return result;
     }