From 1af91269c8aea6bb66a6c52c57dcfa3e0d4b9369 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Tue, 25 Jun 2024 22:47:52 +0800 Subject: [PATCH] fix --- .../org/apache/doris/qe/NereidsCoordinator.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java b/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java index 0d1b8df9d3dd45a..83ef98fdcca9e35 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java @@ -162,20 +162,7 @@ private void setForBucketScanSource(FInstanceExecParam instanceExecParam, if (scanNode instanceof OlapScanNode) { OlapScanNode olapScanNode = (OlapScanNode) scanNode; if (!fragmentIdToSeqToAddressMap.containsKey(scanNode.getFragmentId())) { - // 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 (olapScanNode.getOlapTable().isColocateTable()) { - bucketNum = olapScanNode.getOlapTable().getDefaultDistributionInfo() - .getBucketNum(); - } else { - bucketNum = (int) (olapScanNode.getTotalTabletsNum()); - } + int bucketNum = olapScanNode.getBucketNum(); fragmentIdToSeqToAddressMap.put(olapScanNode.getFragmentId(), new HashMap<>()); bucketShuffleJoinController.fragmentIdBucketSeqToScanRangeMap .put(scanNode.getFragmentId(), new BucketSeqToScanRange());