You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/12/26 11:41:26 UTC
[doris] branch branch-1.1-lts updated: [fix](fe)fix bug of the bucket shuffle join is not recognized (#15368)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new facf76ea97 [fix](fe)fix bug of the bucket shuffle join is not recognized (#15368)
facf76ea97 is described below
commit facf76ea9771384a0b2392ab81a4107f7330e173
Author: starocean999 <40...@users.noreply.github.com>
AuthorDate: Mon Dec 26 19:41:19 2022 +0800
[fix](fe)fix bug of the bucket shuffle join is not recognized (#15368)
---
.../org/apache/doris/planner/DistributedPlanner.java | 2 +-
.../main/java/org/apache/doris/planner/PlanNode.java | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 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 840f28fb9d..682ad03553 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
@@ -639,7 +639,7 @@ public class DistributedPlanner {
continue;
}
- SlotRef leftSlot = lhsJoinExpr.unwrapSlotRef();
+ SlotRef leftSlot = node.getChild(0).findSrcSlotRef(lhsJoinExpr.getSrcSlotRef());
if (leftSlot.getTable() instanceof OlapTable
&& leftScanNode.desc.getSlots().contains(leftSlot.getDesc())) {
// table name in SlotRef is not the really name. `select * from test as t`
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
index 63f28db103..13bf4921c3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
@@ -28,6 +28,7 @@ import org.apache.doris.analysis.SlotRef;
import org.apache.doris.analysis.TupleDescriptor;
import org.apache.doris.analysis.TupleId;
import org.apache.doris.catalog.Function;
+import org.apache.doris.catalog.OlapTable;
import org.apache.doris.catalog.Type;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.NotImplementedException;
@@ -861,6 +862,22 @@ abstract public class PlanNode extends TreeNode<PlanNode> {
return null;
}
+ public SlotRef findSrcSlotRef(SlotRef slotRef) {
+ if (slotRef.getTable() instanceof OlapTable) {
+ return slotRef;
+ }
+ if (this instanceof HashJoinNode) {
+ HashJoinNode hashJoinNode = (HashJoinNode) this;
+ SlotRef inputSlotRef = hashJoinNode.getMappedInputSlotRef(slotRef);
+ if (inputSlotRef != null) {
+ return hashJoinNode.getChild(0).findSrcSlotRef(inputSlotRef);
+ } else {
+ return slotRef;
+ }
+ }
+ return slotRef;
+ }
+
protected void addRuntimeFilter(RuntimeFilter filter) { runtimeFilters.add(filter); }
protected Collection<RuntimeFilter> getRuntimeFilters() { return runtimeFilters; }
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org