Caideyipi commented on code in PR #12271:
URL: https://github.com/apache/iotdb/pull/12271#discussion_r1580870874


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/extractor/dataregion/realtime/epoch/TsFileEpochManager.java:
##########
@@ -79,7 +86,24 @@ public PipeRealtimeEvent 
bindPipeInsertNodeTabletInsertionEvent(
     return new PipeRealtimeEvent(
         event,
         epoch,
-        Collections.singletonMap(node.getDevicePath().getFullPath(), 
node.getMeasurements()),
+        node instanceof InsertRowsNode
+            ? getDevice2MeasurementsMapFromInsertRowsNode((InsertRowsNode) 
node)

Review Comment:
   Can be replaced with "return 
insertRowNodeList.stream().collect(Collectors.toMap(insertRowNode -> 
insertRowNode.getDevicePath().getFullPath(), InsertNode::getMeasurements));"



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsNode.java:
##########
@@ -259,12 +262,91 @@ public <R, C> R accept(PlanVisitor<R, C> visitor, C 
context) {
 
   @Override
   public long getMinTime() {

Review Comment:
   "return 
insertRowNodeList.stream().map(InsertRowNode::getMinTime).reduce(Long::min).orElse(Long.MAX_VALUE);"
 may be more graceful



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to