[fix](nereids) fix aggr node colocate flag local shuffle depends on (#38016)

## Proposed changes

pick from https://github.com/apache/doris/pull/37788

Co-authored-by: zhongjian.xzj <zhongjian.xzj@zhongjianxzjdeMacBook-Pro.local>
This commit is contained in:
xzj7019
2024-07-17 21:34:30 +08:00
committed by GitHub
parent 78d51ca320
commit 629d7ff048

View File

@ -1045,9 +1045,7 @@ public class PhysicalPlanTranslator extends DefaultPlanVisitor<PlanFragment, Pla
// 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
&& aggregate.getAggregateParam().aggMode != AggMode.INPUT_TO_BUFFER) {
if (aggregate.getAggregateParam().aggMode != AggMode.INPUT_TO_BUFFER) {
inputPlanFragment.setHasColocatePlanNode(true);
// Set colocate info in agg node. This is a hint for local shuffling to decide which type of
// local exchanger will be used.