[fix](planner) passthrough child in SetOperationNode is wrong when enable vector engine (#9991)
In SetOperationNode we do passthrough, if we child output is same with itself output. In method isChildPassthrough we only consider memory layout. When we use vectorized engine, we need to use SlotDesc offset in TupleDesc instead of memory layout to check whether pass-through can be performed
This commit is contained in:
@ -25,6 +25,7 @@ import org.apache.doris.analysis.TupleDescriptor;
|
||||
import org.apache.doris.analysis.TupleId;
|
||||
import org.apache.doris.common.CheckedMath;
|
||||
import org.apache.doris.common.UserException;
|
||||
import org.apache.doris.common.util.VectorizedUtil;
|
||||
import org.apache.doris.thrift.TExceptNode;
|
||||
import org.apache.doris.thrift.TExplainLevel;
|
||||
import org.apache.doris.thrift.TExpr;
|
||||
@ -282,8 +283,14 @@ public abstract class SetOperationNode extends PlanNode {
|
||||
if (childSlotRef == null) {
|
||||
return false;
|
||||
}
|
||||
if (!childSlotRef.getDesc().layoutEquals(setOpSlotRef.getDesc())) {
|
||||
return false;
|
||||
if (VectorizedUtil.isVectorized()) {
|
||||
if (childSlotRef.getDesc().getSlotOffset() != setOpSlotRef.getDesc().getSlotOffset()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!childSlotRef.getDesc().layoutEquals(setOpSlotRef.getDesc())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user