You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/14 12:01:50 UTC

[GitHub] [shardingsphere] azexcy commented on a diff in pull request #20966: Optimize the starting position of column index at pipeline

azexcy commented on code in PR #20966:
URL: https://github.com/apache/shardingsphere/pull/20966#discussion_r970714956


##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoader.java:
##########
@@ -88,34 +93,66 @@ private boolean isSchemaAvailable() {
     
     private Map<TableName, PipelineTableMetaData> loadTableMetaData0(final Connection connection, final String schemaName, final String tableNamePattern) throws SQLException {
         Map<String, Map<String, PipelineColumnMetaData>> tablePipelineColumnMetaDataMap = new LinkedHashMap<>();
-        try (ResultSet resultSet = connection.getMetaData().getColumns(connection.getCatalog(), schemaName, tableNamePattern, "%")) {
+        Map<String, Map<String, Collection<String>>> uniqueKeysMap = new HashMap<>();
+        Map<String, Set<String>> primaryKeysMap = new HashMap<>();

Review Comment:
   Use lazy loading?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org