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 2021/05/26 01:29:23 UTC

[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #10458: Fix the bug 'Exceeded the maximum number of open cursors'

strongduanmu commented on a change in pull request #10458:
URL: https://github.com/apache/shardingsphere/pull/10458#discussion_r639338859



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java
##########
@@ -37,21 +38,21 @@
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class ColumnMetaDataLoader {
-    
+
     private static final String COLUMN_NAME = "COLUMN_NAME";
-    
+
     private static final String DATA_TYPE = "DATA_TYPE";
-    
+
     private static final String TYPE_NAME = "TYPE_NAME";
-    
+
     private static final String TABLE_NAME = "TABLE_NAME";
-    
+
     /**
      * Load column meta data list.
-     * 
-     * @param connection connection
+     *
+     * @param connection       connection

Review comment:
       @chenxk Please refer the doc of [Code of Conduct](https://shardingsphere.apache.org/community/en/contribute/code-conduct/), and execute checkstyle first.

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java
##########
@@ -37,21 +38,21 @@
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class ColumnMetaDataLoader {
-    
+
     private static final String COLUMN_NAME = "COLUMN_NAME";
-    
+
     private static final String DATA_TYPE = "DATA_TYPE";
-    
+
     private static final String TYPE_NAME = "TYPE_NAME";
-    
+
     private static final String TABLE_NAME = "TABLE_NAME";
-    

Review comment:
       @chenxk Please keep indents consistent with the previous one.

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java
##########
@@ -75,22 +76,24 @@
                 }
             }
         }
-        try (ResultSet resultSet = connection.createStatement().executeQuery(generateEmptyResultSQL(tableNamePattern, databaseType))) {
+        Statement statement = connection.createStatement();
+        try (ResultSet resultSet = statement.executeQuery(generateEmptyResultSQL(tableNamePattern, databaseType))) {

Review comment:
       @chenxk 
   This style may be better.
   ```java
   try (Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(generateEmptyResultSQL(tableNamePattern, databaseType))) {
   ```
   




-- 
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:
users@infra.apache.org