This is an automated email from the ASF dual-hosted git repository.

chaow pushed a commit to branch rel/0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/0.12 by this push:
     new c1977f1  Fix import csv throw ArrayOutOfIndexError when the last value 
in a line is null (#3185) (#3215)
c1977f1 is described below

commit c1977f12d96104977692d9811d05841a4d74b167
Author: chaow <[email protected]>
AuthorDate: Wed May 19 11:08:14 2021 +0800

    Fix import csv throw ArrayOutOfIndexError when the last value in a line is 
null (#3185) (#3215)
    
    Co-authored-by: Haimei Guo <[email protected]>
---
 cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java 
b/cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java
index b0d3075..6959360 100644
--- a/cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java
+++ b/cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java
@@ -435,6 +435,9 @@ public class ImportCsv extends AbstractCsvTool {
         nextNode(path, nodes, '\'');
       }
     }
+    if (path.charAt(path.length() - 1) == ',') {
+      nodes.add("");
+    }
     if (startIndex <= path.length() - 1) {
       nodes.add(path.substring(startIndex));
     }

Reply via email to