Copilot commented on code in PR #17273:
URL: https://github.com/apache/pinot/pull/17273#discussion_r2562762114


##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotJoinToDynamicBroadcastRule.java:
##########
@@ -21,7 +21,6 @@
 import org.apache.calcite.plan.RelOptRule;
 import org.apache.calcite.plan.RelOptRuleCall;
 import org.apache.calcite.plan.hep.HepRelVertex;
-import org.apache.calcite.rel.RelDistribution;
 import org.apache.calcite.rel.RelDistributions;

Review Comment:
   The import for `org.apache.calcite.rel.RelDistribution` was removed but this 
could cause compilation issues if `RelDistribution` type is used elsewhere in 
the file. Verify that all references to `RelDistribution` class are removed or 
that the type is available through other imports.



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerManager.java:
##########
@@ -146,6 +147,20 @@ private void assignWorkersToNonRootFragment(PlanFragment 
fragment, DispatchableP
     }
   }
 
+  private boolean isLookupJoin(List<PlanFragment> children) {
+    if (children.size() != 1) {
+      return false;
+    }
+    PlanNode planNode = children.get(0).getFragmentRoot();
+    if (!(planNode instanceof MailboxSendNode)) {
+      return false;
+    }
+    MailboxSendNode mailboxSendNode = (MailboxSendNode) planNode;
+    // NOTE: Exclude colocated semi-join which also contains a single 
SINGLETON exchange.
+    return mailboxSendNode.getDistributionType() == 
RelDistribution.Type.SINGLETON
+        && mailboxSendNode.getExchangeType() != 
PinotRelExchangeType.PIPELINE_BREAKER;
+  }
+
   private boolean isLocalExchange(PlanFragment fragment, 
DispatchablePlanContext context) {
     PlanNode planNode = fragment.getFragmentRoot();
     if (planNode instanceof MailboxSendNode

Review Comment:
   The `isLocalExchange` method appears to be unused after refactoring to use 
`isLookupJoin`. If this method is no longer needed, it should be removed to 
avoid confusion and reduce maintenance burden.



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