walterddr commented on code in PR #12079:
URL: https://github.com/apache/pinot/pull/12079#discussion_r1419625532


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/MailboxAssignmentVisitor.java:
##########
@@ -144,4 +145,23 @@ public Void process(PlanNode node, DispatchablePlanContext 
context) {
     }
     return null;
   }
+
+  private boolean isDirectExchangeCompatible(DispatchablePlanMetadata sender, 
DispatchablePlanMetadata receiver) {
+    Map<Integer, QueryServerInstance> senderServerMap = 
sender.getWorkerIdToServerInstanceMap();
+    Map<Integer, QueryServerInstance> receiverServerMap = 
receiver.getWorkerIdToServerInstanceMap();
+
+    int numSenders = senderServerMap.size();
+    int numReceivers = receiverServerMap.size();
+    if (sender.getScannedTables().size() > 0 && 
receiver.getScannedTables().size() == 0) {
+      // leaf-to-intermediate condition
+      return numSenders * sender.getPartitionParallelism() == numReceivers
+          && sender.getPartitionFunction() != null
+          && 
sender.getPartitionFunction().equals(receiver.getPartitionFunction());

Review Comment:
   done



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to