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 95e5e13c31 [fix] a slot id is bounded on a wrong tuple id, if cross
join has a hash join as child #12221
95e5e13c31 is described below
commit 95e5e13c3185104c6c8b21e5ba0bdfe9ef5f5f9d
Author: minghong <[email protected]>
AuthorDate: Wed Aug 31 14:08:59 2022 +0800
[fix] a slot id is bounded on a wrong tuple id, if cross join has a hash
join as child #12221
---
.../src/main/java/org/apache/doris/planner/HashJoinNode.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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 8f255ba88b..e0ebacfc91 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
@@ -377,7 +377,9 @@ public class HashJoinNode extends PlanNode {
int leftNullableNumber = 0;
int rightNullableNumber = 0;
if (copyLeft) {
- for (TupleDescriptor leftTupleDesc :
analyzer.getDescTbl().getTupleDesc(getChild(0).getOutputTblRefIds())) {
+ List<TupleId> srcTupleIds = getChild(0) instanceof CrossJoinNode ?
getChild(0).getOutputTupleIds()
+ : getChild(0).getOutputTblRefIds();
+ for (TupleDescriptor leftTupleDesc :
analyzer.getDescTbl().getTupleDesc(srcTupleIds)) {
// if the child is cross join node, the only way to get the
correct nullable info of its output slots
// is to check if the output tuple ids are outer joined or not.
// then pass this nullable info to hash join node will be
correct.
@@ -401,8 +403,10 @@ public class HashJoinNode extends PlanNode {
}
}
if (copyRight) {
+ List<TupleId> srcTupleIds = getChild(1) instanceof CrossJoinNode ?
getChild(1).getOutputTupleIds()
+ : getChild(1).getOutputTblRefIds();
for (TupleDescriptor rightTupleDesc :
-
analyzer.getDescTbl().getTupleDesc(getChild(1).getOutputTblRefIds())) {
+ analyzer.getDescTbl().getTupleDesc(srcTupleIds)) {
boolean needSetToNullable =
getChild(1) instanceof CrossJoinNode &&
analyzer.isOuterJoined(rightTupleDesc.getId());
for (SlotDescriptor rightSlotDesc : rightTupleDesc.getSlots())
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]