[opt](Nereids) enable parallel scan for local phase agg (#21642)
after we forbid some cases off agg candidate plans, all local phase agg require DistributionSpecAny for child. So, we could enable parallel scan for it
This commit is contained in:
@ -699,8 +699,11 @@ public class PhysicalPlanTranslator extends DefaultPlanVisitor<PlanFragment, Pla
|
||||
// TODO: nereids forbid all parallel scan under aggregate temporary, because nereids could generate
|
||||
// so complex aggregate plan than legacy planner, and should add forbid parallel scan hint when
|
||||
// generate physical aggregate plan.
|
||||
// There is one exception, we use some precondition in optimizer, input to buffer always require any for input,
|
||||
// so when agg mode is INPUT_TO_BUFFER, we do not forbid parallel scan
|
||||
if (leftMostNode instanceof OlapScanNode
|
||||
&& inputPlanFragment.getDataPartition().getType() != TPartitionType.RANDOM) {
|
||||
&& inputPlanFragment.getDataPartition().getType() != TPartitionType.RANDOM
|
||||
&& aggregate.getAggregateParam().aggMode != AggMode.INPUT_TO_BUFFER) {
|
||||
inputPlanFragment.setHasColocatePlanNode(true);
|
||||
}
|
||||
setPlanRoot(inputPlanFragment, aggregationNode, aggregate);
|
||||
|
||||
Reference in New Issue
Block a user