[fix](planner)need call materializeSrcExpr for materialized slots in join node (#25204)
This commit is contained in:
@ -92,6 +92,7 @@ public class SlotDescriptor {
|
||||
this.isAgg = false;
|
||||
this.stats = src.stats;
|
||||
this.type = src.type;
|
||||
this.sourceExprs.add(new SlotRef(src));
|
||||
}
|
||||
|
||||
public boolean isMultiRef() {
|
||||
|
||||
@ -168,9 +168,6 @@ public abstract class JoinNodeBase extends PlanNode {
|
||||
boolean needSetToNullable =
|
||||
getChild(0) instanceof JoinNodeBase && analyzer.isOuterJoined(leftTupleDesc.getId());
|
||||
for (SlotDescriptor leftSlotDesc : leftTupleDesc.getSlots()) {
|
||||
if (!isMaterializedByChild(leftSlotDesc, getChild(0).getOutputSmap())) {
|
||||
continue;
|
||||
}
|
||||
SlotDescriptor outputSlotDesc =
|
||||
analyzer.getDescTbl().copySlotDescriptor(vOutputTupleDesc, leftSlotDesc);
|
||||
if (leftNullable) {
|
||||
@ -191,9 +188,6 @@ public abstract class JoinNodeBase extends PlanNode {
|
||||
boolean needSetToNullable =
|
||||
getChild(1) instanceof JoinNodeBase && analyzer.isOuterJoined(rightTupleDesc.getId());
|
||||
for (SlotDescriptor rightSlotDesc : rightTupleDesc.getSlots()) {
|
||||
if (!isMaterializedByChild(rightSlotDesc, getChild(1).getOutputSmap())) {
|
||||
continue;
|
||||
}
|
||||
SlotDescriptor outputSlotDesc =
|
||||
analyzer.getDescTbl().copySlotDescriptor(vOutputTupleDesc, rightSlotDesc);
|
||||
if (rightNullable) {
|
||||
@ -226,6 +220,7 @@ public abstract class JoinNodeBase extends PlanNode {
|
||||
rSlotRef.getDesc().setIsMaterialized(lSlotRef.getDesc().isMaterialized());
|
||||
} else {
|
||||
rSlotRef.getDesc().setIsMaterialized(true);
|
||||
rSlotRef.materializeSrcExpr();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user