Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Jan 6, 2025
1 parent 5119d98 commit 1fe420c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.doris.nereids.trees.plans.distribute.worker.DistributedPlanWorker;
import org.apache.doris.planner.ExchangeNode;
import org.apache.doris.planner.PlanFragment;
import org.apache.doris.planner.PlanNode;
import org.apache.doris.qe.ConnectContext;

import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -77,6 +78,9 @@ selectedWorker, new DefaultScanSource(ImmutableMap.of())
}

protected int degreeOfParallelism() {
if (fragment.getPlanRoot().anyMatch(p -> ((PlanNode) p).isSerialOperator())) {
return 1;
}
return useLocalShuffleToAddParallel ? fragment.getParallelExecNum() : 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ protected int degreeOfParallelism() {
expectInstanceNum = ConnectContext.get().getSessionVariable().getExchangeInstanceParallel();
}

if (fragment.getPlanRoot().anyMatch(p -> ((PlanNode) p).isSerialOperator())) {
return 1;
}

// TODO: check nested loop join do right outer / semi / anti join
return expectInstanceNum;
}
Expand Down

0 comments on commit 1fe420c

Please sign in to comment.