Jackie-Jiang commented on code in PR #11630:
URL: https://github.com/apache/pinot/pull/11630#discussion_r1331949272


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/colocated/GreedyShuffleRewriteVisitor.java:
##########
@@ -190,23 +191,24 @@ public Set<ColocationKey> 
visitMailboxReceive(MailboxReceiveNode node, GreedyShu
       // distribution.
       ((MailboxSendNode) 
node.getSender()).setDistributionType(RelDistribution.Type.SINGLETON);
       return oldColocationKeys;
-    } else if (selector == null) {
+    } else if (distributionKeys == null) {
       return new HashSet<>();
     }
     // This means we can't skip shuffle and there's a partitioning enforced by 
receiver.
     int numPartitions = new HashSet<>(
         
_dispatchablePlanMetadataMap.get(node.getPlanFragmentId()).getWorkerIdToServerInstanceMap().values()).size();
-    List<ColocationKey> colocationKeys = ((FieldSelectionKeySelector) 
selector).getColumnIndices().stream()
-        .map(x -> new ColocationKey(x, numPartitions, 
selector.hashAlgorithm())).collect(Collectors.toList());
+    List<ColocationKey> colocationKeys =
+        distributionKeys.stream().map(x -> new ColocationKey(x, numPartitions, 
KeySelector.DEFAULT_HASH_ALGORITHM))

Review Comment:
   This optimizer is triggered by a hint, and we are not using it. I believe 
the long term plan is to remove it. cc @walterddr 



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