You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2023/09/20 17:10:06 UTC
[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11630: Optimize group-by and join for single key scenario
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org