tristaZero commented on a change in pull request #7574:
URL: https://github.com/apache/shardingsphere/pull/7574#discussion_r493332797
##########
File path:
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/metadata/YamlRuleSchemaMetaData.java
##########
@@ -32,5 +33,5 @@
private YamlSchemaMetaData configuredSchemaMetaData;
- private Map<String, YamlSchemaMetaData> unconfiguredSchemaMetaDataMap;
+ private Map<String, Collection<String>> unconfiguredSchemaMetaDataMap;
Review comment:
This PR looks great. However, I found another issue relevant to what you
modified.
```java
// CreateTableStatementMetaDataRefreshStrategy
private void refreshUnconfiguredMetaData(final ShardingSphereMetaData
metaData,
final DatabaseType
databaseType, final Map<String, DataSource> dataSourceMap, final String
tableName) throws SQLException {
for (Entry<String, DataSource> entry : dataSourceMap.entrySet()) {
Optional<TableMetaData> tableMetaData =
TableMetaDataLoader.loadWithoutColumnMetaData(entry.getValue(), tableName,
databaseType.getName());
if (tableMetaData.isPresent()) {
refreshUnconfiguredMetaData(metaData, tableName,
entry.getKey());
return;
}
}
}
```
`loadWithoutColumnMetaData` is supposed to be simplified, IMO. What do you
think?
##########
File path:
shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/resources/yaml/metadata.yaml
##########
@@ -30,15 +30,4 @@ configuredSchemaMetaData:
name: PRIMARY
unconfiguredSchemaMetaDataMap:
ds_0:
- tables:
- t_user:
- columns:
- id:
- caseSensitive: false
- dataType: 0
- generated: false
- name: id
- primaryKey: true
- indexes:
- primary:
- name: PRIMARY
+ - t_user
Review comment:
Please add a blank line under this line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]