You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "luoluoyuyu (via GitHub)" <gi...@apache.org> on 2025/07/31 09:41:29 UTC

Re: [PR] Pipe: Optimized the table model writing latency by batching & Fixed the NPE caused by tablet event sorting [iotdb]

luoluoyuyu commented on code in PR #16062:
URL: https://github.com/apache/iotdb/pull/16062#discussion_r2244880983


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertTabletNode.java:
##########
@@ -187,6 +190,22 @@ public void setRange(List<Integer> range) {
     this.range = range;
   }
 
+  public Tablet convertToTablet() {
+    final Tablet tablet =
+        new Tablet(
+            getTableName(),
+            Arrays.asList(measurements),
+            Arrays.asList(dataTypes),
+            Arrays.stream(columnCategories)
+                .map(TsTableColumnCategory::toTsFileColumnType)
+                .collect(Collectors.toList()),
+            rowCount);
+    tablet.setBitMaps(bitMaps);
+    tablet.setTimestamps(times);
+    tablet.setValues(columns);

Review Comment:
   Please note that type conversion is required here, you can reuse the Pipe InsertNode Parser method



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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org