Beyyes commented on code in PR #11526:
URL: https://github.com/apache/iotdb/pull/11526#discussion_r1390926341


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java:
##########
@@ -162,17 +162,13 @@ public List<PlanNode> visitDeviceView(DeviceViewNode 
node, DistributionPlanConte
     Set<TRegionReplicaSet> relatedDataRegions = new HashSet<>();
 
     List<DeviceViewSplit> deviceViewSplits = new ArrayList<>();
+
     // Step 1: constructs DeviceViewSplit
-    Map<String, List<String>> outputDeviceToQueriedDevicesMap =
-        analysis.getOutputDeviceToQueriedDevicesMap();
     for (int i = 0; i < node.getDevices().size(); i++) {
       String outputDevice = node.getDevices().get(i);
       PlanNode child = node.getChildren().get(i);
-      List<TRegionReplicaSet> regionReplicaSets = new ArrayList<>();
-      for (String queriedDevice : 
outputDeviceToQueriedDevicesMap.get(outputDevice)) {

Review Comment:
   size of `outputDeviceToQueriedDevicesMap.get(outputDevice)` can only be 0 or 
1;
   
   Can optimize this process, if no LogicalView, does'n need these step.



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java:
##########
@@ -1789,10 +1785,7 @@ private void analyzeDataPartition(
       Analysis analysis, QueryStatement queryStatement, ISchemaTree 
schemaTree) {
     Set<String> deviceSet = new HashSet<>();
     if (queryStatement.isAlignByDevice()) {
-      deviceSet =

Review Comment:
   optimize it, it no LogicalView, just use analysis.getDeviceList().



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