[fix](Nereids) colcoate node attr lost after merge fragment (#30818)
This commit is contained in:
@ -212,9 +212,17 @@ public class PlanTranslatorContext {
|
||||
exprIdToColumnRef.put(exprId, columnRefExpr);
|
||||
}
|
||||
|
||||
/**
|
||||
* merge source fragment info into target fragment.
|
||||
* include runtime filter info and fragment attribute.
|
||||
*/
|
||||
public void mergePlanFragment(PlanFragment srcFragment, PlanFragment targetFragment) {
|
||||
srcFragment.getTargetRuntimeFilterIds().forEach(targetFragment::setTargetRuntimeFilterIds);
|
||||
srcFragment.getBuilderRuntimeFilterIds().forEach(targetFragment::setBuilderRuntimeFilterIds);
|
||||
targetFragment.setHasColocatePlanNode(targetFragment.hasColocatePlanNode()
|
||||
|| srcFragment.hasColocatePlanNode());
|
||||
targetFragment.setHasNullAwareLeftAntiJoin(targetFragment.isHasNullAwareLeftAntiJoin()
|
||||
|| srcFragment.isHasNullAwareLeftAntiJoin());
|
||||
this.planFragments.remove(srcFragment);
|
||||
}
|
||||
|
||||
|
||||
@ -31,6 +31,8 @@ public class MultiCastPlanFragment extends PlanFragment {
|
||||
public MultiCastPlanFragment(PlanFragment planFragment) {
|
||||
super(planFragment.getFragmentId(), planFragment.getPlanRoot(), planFragment.getDataPartition(),
|
||||
planFragment.getBuilderRuntimeFilterIds(), planFragment.getTargetRuntimeFilterIds());
|
||||
this.hasColocatePlanNode = planFragment.hasColocatePlanNode;
|
||||
this.hasNullAwareLeftAntiJoin = planFragment.hasNullAwareLeftAntiJoin;
|
||||
this.outputPartition = DataPartition.RANDOM;
|
||||
this.children.addAll(planFragment.getChildren());
|
||||
}
|
||||
|
||||
@ -147,9 +147,9 @@ public class PlanFragment extends TreeNode<PlanFragment> {
|
||||
private int bucketNum;
|
||||
|
||||
// has colocate plan node
|
||||
private boolean hasColocatePlanNode = false;
|
||||
protected boolean hasColocatePlanNode = false;
|
||||
|
||||
private boolean hasNullAwareLeftAntiJoin = false;
|
||||
protected boolean hasNullAwareLeftAntiJoin = false;
|
||||
|
||||
private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user