morrySnow commented on code in PR #10045:
URL: https://github.com/apache/incubator-doris/pull/10045#discussion_r893714076
##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -1850,9 +1850,19 @@ private void
getExecHostPortForFragmentIDAndBucketSeq(TScanRangeLocations seqLoc
private void computeScanRangeAssignmentByBucket(
final OlapScanNode scanNode, ImmutableMap<Long, Backend>
idToBackend, Map<TNetworkAddress, Long> addressToBackendID) throws Exception {
if
(!fragmentIdToSeqToAddressMap.containsKey(scanNode.getFragmentId())) {
- // The bucket shuffle join only hit when the partition is one.
so the totalTabletsNum is all tablet of
- // one hit partition. can be the right bucket num in bucket
shuffle join
- fragmentIdToBucketNumMap.put(scanNode.getFragmentId(), (int)
scanNode.getTotalTabletsNum());
+ // In bucket shuffle join, we have 2 situation.
+ // 1. Only one partition: in this case, we use
scanNode.getTotalTabletsNum() to get the right bucket num
+ // because when table turn on dynamic partition, the bucket
number in default distribution info
+ // is not correct.
+ // 2. Table is colocated: in this case, table could have more
than one partition, but all partition's
+ // bucket number must be same, so we use default bucket num
is ok.
+ int bucketNum = 0;
+ if (scanNode.getOlapTable().isColocateTable()) {
Review Comment:
already handled in [DistributedPlanner
](https://github.com/apache/incubator-doris/blob/e701c057dc675babe7a859e151287fea7cd5c850/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java#L618)
--
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]