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 2020/03/10 01:11:29 UTC

[GitHub] [incubator-iotdb] SilverNarcissus commented on a change in pull request #888: [IOTDB-442]Add session api

SilverNarcissus commented on a change in pull request #888: [IOTDB-442]Add session api
URL: https://github.com/apache/incubator-iotdb/pull/888#discussion_r390043411
 
 

 ##########
 File path: session/src/main/java/org/apache/iotdb/session/Session.java
 ##########
 @@ -357,6 +392,23 @@ private Object sortList(Object valueList, TSDataType dataType, Integer[] index)
     }
   }
 
+  /**
+   * insert data in one row, if you want improve your performance, please use insertInBatch method
+   * or insertBatch method
+   *
+   * @see Session#insertInBatch(List, List, List, List)
+   * @see Session#insertBatch(RowBatch)
+   */
+  public TSStatus insert(String deviceId, long time, List<String> measurements,
+      Object... values) throws IoTDBSessionException {
+    List<String> stringValues = new ArrayList<>();
+    for (Object o : values) {
+      stringValues.add(o.toString());
 
 Review comment:
   Yes, but after using byte buffer, the performance goes down. The test result is at: https://tower.im/teams/138444/todos/12089/
   If we want to let performance raise, we may refactor InsertPlan.

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


With regards,
Apache Git Services