This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new 0000ed19ff [fix](outerjoin)the hash output slots should contain all
slots from children for outer join (#12314)
0000ed19ff is described below
commit 0000ed19ff007a7cb30b4b7bc934a351df87e988
Author: starocean999 <[email protected]>
AuthorDate: Sat Sep 3 09:36:11 2022 +0800
[fix](outerjoin)the hash output slots should contain all slots from
children for outer join (#12314)
---
.../src/main/java/org/apache/doris/planner/HashJoinNode.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
index e0ebacfc91..285fca5554 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
@@ -86,6 +86,8 @@ public class HashJoinNode extends PlanNode {
private TupleDescriptor vOutputTupleDesc;
private ExprSubstitutionMap vSrcToOutputSMap;
+ boolean hasTupleIsNullPredicate = false;
+
public HashJoinNode(PlanNodeId id, PlanNode outer, PlanNode inner,
TableRef innerRef,
List<Expr> eqJoinConjuncts, List<Expr>
otherJoinConjuncts) {
super(id, "HASH JOIN");
@@ -190,6 +192,11 @@ public class HashJoinNode extends PlanNode {
* @param slotIdList
*/
private void initHashOutputSlotIds(List<SlotId> slotIdList, Analyzer
analyzer) {
+ if (hasTupleIsNullPredicate) {
+ // we have to keep all slots from children if there is a tuple is
null predicate
+ // this is just a workaround solution in dev1.1.2, master doesn't
have such problem
+ return;
+ }
Set<SlotId> hashOutputSlotIdSet = Sets.newHashSet();
// step1: change output slot id to src slot id
if (vSrcToOutputSMap != null) {
@@ -451,6 +458,7 @@ public class HashJoinNode extends PlanNode {
tupleIsNullLhs
.addAll(vSrcToOutputSMap.getLhs().subList(leftNullableNumber,
vSrcToOutputSMap.getLhs().size()));
vSrcToOutputSMap.updateLhsExprs(tupleIsNullLhs);
+ hasTupleIsNullPredicate = true;
}
// Condition1: the right child is null-side
// Condition2: the right child is a inline view
@@ -467,6 +475,7 @@ public class HashJoinNode extends PlanNode {
}
newLhsList.addAll(tupleIsNullLhs);
vSrcToOutputSMap.updateLhsExprs(newLhsList);
+ hasTupleIsNullPredicate = true;
}
}
// 4. change the outputSmap
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]