terrymanu commented on a change in pull request #2949: 4.0.0-RC2 does not support Oracle 12C connection configuration #2911 URL: https://github.com/apache/incubator-shardingsphere/pull/2949#discussion_r324966501
########## File path: sharding-core/sharding-core-execute/src/main/java/org/apache/shardingsphere/core/execute/metadata/TableMetaDataLoader.java ########## @@ -110,48 +111,48 @@ public TableMetaData load(final String logicTableName, final ShardingRule shardi } return result; } - + private Map<String, List<DataNode>> getDataNodeGroups(final TableRule tableRule) { return isCheckingMetaData ? tableRule.getDataNodeGroups() : getFirstDataNodeWithGroups(tableRule); } - + private Map<String, List<DataNode>> getFirstDataNodeWithGroups(final TableRule tableRule) { DataNode firstDataNode = tableRule.getActualDataNodes().iterator().next(); return Collections.singletonMap(firstDataNode.getDataSourceName(), Collections.singletonList(firstDataNode)); } - + private Collection<ShardingExecuteGroup<DataNode>> getDataNodeExecuteGroups(final Map<String, List<DataNode>> dataNodeGroups) { Collection<ShardingExecuteGroup<DataNode>> result = new LinkedList<>(); for (Entry<String, List<DataNode>> entry : dataNodeGroups.entrySet()) { result.addAll(getDataNodeExecuteGroups(entry.getValue())); } return result; } - + private Collection<ShardingExecuteGroup<DataNode>> getDataNodeExecuteGroups(final List<DataNode> dataNodes) { Collection<ShardingExecuteGroup<DataNode>> result = new LinkedList<>(); for (List<DataNode> each : Lists.partition(dataNodes, Math.max(dataNodes.size() / maxConnectionsSizePerQuery, 1))) { result.add(new ShardingExecuteGroup<>(each)); } return result; } - - private TableMetaData createTableMetaData(final Connection connection, final String catalog, + + private TableMetaData createTableMetaData(final Connection connection, final String catalog, final String logicTableName, final String actualTableName, final String generateKeyColumnName, final EncryptRule encryptRule) throws SQLException { if (isTableExist(connection, catalog, actualTableName)) { return new TableMetaData( getColumnMetaDataList(connection, catalog, logicTableName, actualTableName, generateKeyColumnName, encryptRule), getLogicIndexes(connection, catalog, actualTableName)); } return new TableMetaData(Collections.<ColumnMetaData>emptyList(), Collections.<String>emptySet()); } - + private boolean isTableExist(final Connection connection, final String catalog, final String actualTableName) throws SQLException { try (ResultSet resultSet = connection.getMetaData().getTables(catalog, null, actualTableName, null)) { return resultSet.next(); } } - - private Collection<ColumnMetaData> getColumnMetaDataList(final Connection connection, final String catalog, final String logicTableName, final String actualTableName, + Review comment: Please keep original indentation with blank 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: us...@infra.apache.org With regards, Apache Git Services