From 44325ae850d0cda8f2675af5b6825acb246fb988 Mon Sep 17 00:00:00 2001 From: xinghuayu007 <1450306854@qq.com> Date: Thu, 31 Dec 2020 09:49:35 +0800 Subject: [PATCH] [Bug-Fix] Bucket shuffle join executes failed when two tables have no data (#5145) Bucket shuffle join is an algorithm of joining two tables. Left table is distributed by a column. Right table sends the data to the left table for joining operation. It reduces the network cost. But when two table is without any data. Bucket shuffle join will fail. Related Issue: #5144 --- .../main/java/org/apache/doris/planner/DistributedPlanner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java b/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java index efaa5c1d8c7287..16caf11d2d2751 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java @@ -545,7 +545,7 @@ private boolean canBucketShuffleJoin(HashJoinNode node, PlanNode leftRoot, OlapScanNode leftScanNode = ((OlapScanNode) leftRoot); //1 the left table must be only one partition - if (leftScanNode.getSelectedPartitionIds().size() > 1) { + if (leftScanNode.getSelectedPartitionIds().size() != 1) { return false; }