walterddr commented on code in PR #11630:
URL: https://github.com/apache/pinot/pull/11630#discussion_r1332127248
##########
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:
i think for now we can assume that. the problem is we dont know how users
will actually be using. having this configurable can be done in the future when
needed.
--
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]