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/09 17:37:09 UTC

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

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

 ##########
 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:
   I think this implementation is just an syntactic sugar...
   Is there a possible way to send exact class instances (integer, float, etc..) to the server directly, to avoid the server calling functions like `Integer.parse()` 

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