You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/02/03 01:40:07 UTC

[GitHub] [iotdb] mychaow commented on a change in pull request #2613: fix importCSVToo import directory bug & encode bug

mychaow commented on a change in pull request #2613:
URL: https://github.com/apache/iotdb/pull/2613#discussion_r569049950



##########
File path: cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java
##########
@@ -169,14 +172,6 @@ private static void loadDataFromCSV(File file) {
       System.out.println("CSV file read exception because: " + e.getMessage());
     } catch (IoTDBConnectionException | StatementExecutionException e) {
       System.out.println("Meet error when insert csv because " + e.getMessage());
-    } finally {
-      try {
-        if (session != null) {
-          session.close();
-        }
-      } catch (IoTDBConnectionException e) {
-        System.out.println("Sql statement can not be closed because: " + e.getMessage());
-      }

Review comment:
       session will be closed in the importCsvFromFile method which calls this method. So,  closing session is unnecessary here.  




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