iotdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genius...@apache.org
Subject [iotdb] 03/04: insert
Date Mon, 02 Nov 2020 07:54:09 GMT
This is an automated email from the ASF dual-hosted git repository.

geniuspig pushed a commit to branch change_jdbc_to_session_in_csv
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit d81c2131ed84b999ac3e63c83f4f784bbd848891
Author: Boris <969032536@qq.com>
AuthorDate: Mon Nov 2 14:22:56 2020 +0800

    insert
---
 cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java | 8 ++++++++
 1 file changed, 8 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 21f9016..266add5 100644
--- a/cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java
+++ b/cli/src/main/java/org/apache/iotdb/tool/ImportCsv.java
@@ -135,6 +135,14 @@ public class ImportCsv extends AbstractCsvTool {
         for(String device: deviceToMeasurementsAndPositions.keySet()) {
           devices.add(device);
           Map<String, Integer> measurementsAndPositions = deviceToMeasurementsAndPositions.get(device);
+          List<String> measurements = new ArrayList<>();
+          List<String> values = new ArrayList<>();
+          for(String measurement : measurementsAndPositions.keySet()) {
+            measurements.add(measurement);
+            values.add(cols[measurementsAndPositions.get(measurement)]);
+          }
+          measurementsList.add(measurements);
+          valuesList.add(values);
         }
       }
 


Mime
View raw message