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/01/14 01:26:46 UTC

[GitHub] [incubator-iotdb] SilverNarcissus commented on a change in pull request #712: [IOTDB-408] Improve batch insert in partitioned storage group

SilverNarcissus commented on a change in pull request #712: [IOTDB-408] Improve batch insert in partitioned storage group
URL: https://github.com/apache/incubator-iotdb/pull/712#discussion_r366113615
 
 

 ##########
 File path: session/src/main/java/org/apache/iotdb/session/Session.java
 ##########
 @@ -201,6 +206,98 @@ public TSExecuteBatchStatementResp insertBatch(RowBatch rowBatch)
     }
   }
 
+  /**
+   * use batch interface to insert data
+   *
+   * @param rowBatch data batch
+   */
+  public TSExecuteBatchStatementResp insertBatch(RowBatch rowBatch)
+      throws IoTDBSessionException {
+    sortRowBatch(rowBatch);
+
+    return insertSortedBatch(rowBatch);
+  }
+
+  private void sortRowBatch(RowBatch rowBatch){
+    /*
+       * following part of code sort the batch data by time,
+       * so we can insert continuous data in value list to get a better performance
+       */
+    // sort to get index, and use index to sort value list
 
 Review comment:
   fixed~

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