Skip to content

Commit b80be52

Browse files
authored
[fix](local shuffle) fix set operation compute wrong data because not set AggregationNode.isColocate (#59840)
fix set operation compute wrong data because not set AggregationNode.isColocate
1 parent ec54b49 commit b80be52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,7 +2030,7 @@ public PlanFragment visitPhysicalPartitionTopN(PhysicalPartitionTopN<? extends P
20302030
// in pipeline engine, we use parallel scan by default, but it broke the rule of data distribution
20312031
// we need turn of parallel scan to ensure to get correct result.
20322032
if (partitionTopN.getPhase() == PartitionTopnPhase.ONE_PHASE_GLOBAL_PTOPN
2033-
&& findOlapScanNodesByPassExchangeAndJoinNode(inputFragment.getPlanRoot())) {
2033+
&& findOlapScanNodesByPassExchangeNode(inputFragment.getPlanRoot())) {
20342034
inputFragment.setHasColocatePlanNode(true);
20352035
}
20362036
return inputFragment;
@@ -2365,7 +2365,7 @@ public PlanFragment visitPhysicalSetOperation(
23652365
// we need turn of parallel scan to ensure to get correct result.
23662366
// TODO: nereids forbid all parallel scan under PhysicalSetOperation temporary
23672367
if (!setOperation.getPhysicalProperties().equals(PhysicalProperties.ANY)
2368-
&& findOlapScanNodesByPassExchangeAndJoinNode(setOperationFragment.getPlanRoot())) {
2368+
&& findOlapScanNodesByPassExchangeNode(setOperationFragment.getPlanRoot())) {
23692369
setOperationFragment.setHasColocatePlanNode(true);
23702370
setOperationNode.setColocate(true);
23712371
}
@@ -2672,7 +2672,7 @@ public PlanFragment visitPhysicalWindow(PhysicalWindow<? extends Plan> physicalW
26722672
// in pipeline engine, we use parallel scan by default, but it broke the rule of data distribution
26732673
// we need turn of parallel scan to ensure to get correct result.
26742674
// TODO: nereids forbid all parallel scan under PhysicalSetOperation temporary
2675-
if (findOlapScanNodesByPassExchangeAndJoinNode(inputPlanFragment.getPlanRoot())) {
2675+
if (findOlapScanNodesByPassExchangeNode(inputPlanFragment.getPlanRoot())) {
26762676
inputPlanFragment.setHasColocatePlanNode(true);
26772677
analyticEvalNode.setColocate(true);
26782678
if (root instanceof SortNode) {
@@ -3170,11 +3170,11 @@ private PhysicalCTEConsumer getCTEConsumerChild(PhysicalPlan root) {
31703170
}
31713171
}
31723172

3173-
private boolean findOlapScanNodesByPassExchangeAndJoinNode(PlanNode root) {
3173+
private boolean findOlapScanNodesByPassExchangeNode(PlanNode root) {
31743174
if (root instanceof OlapScanNode) {
31753175
return true;
3176-
} else if (!(root instanceof JoinNodeBase || root instanceof ExchangeNode)) {
3177-
return root.getChildren().stream().anyMatch(child -> findOlapScanNodesByPassExchangeAndJoinNode(child));
3176+
} else if (!(root instanceof ExchangeNode)) {
3177+
return root.getChildren().stream().anyMatch(child -> findOlapScanNodesByPassExchangeNode(child));
31783178
}
31793179
return false;
31803180
}

0 commit comments

Comments
 (0)