From 977d957769844a2b399d6c655cf3ce2cffbd08fe Mon Sep 17 00:00:00 2001 From: 924060929 Date: Fri, 3 Jan 2025 11:30:28 +0800 Subject: [PATCH] fix --- .../distribute/worker/job/AbstractUnassignedScanJob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/AbstractUnassignedScanJob.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/AbstractUnassignedScanJob.java index 0374b492bbba6b1..5f96b10fdd65743 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/AbstractUnassignedScanJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/AbstractUnassignedScanJob.java @@ -84,7 +84,7 @@ protected List insideMachineParallelization( ScanSource scanSource = entry.getValue().scanSource; // usually, its tablets num, or buckets num - int scanSourceMaxParallel = Math.max(scanSource.maxParallel(scanNodes), 1); + int scanSourceMaxParallel = scanSource.maxParallel(scanNodes); // now we should compute how many instances to process the data, // for example: two instances @@ -180,7 +180,7 @@ protected int degreeOfParallelism(int maxParallel, boolean useLocalShuffleToAddP } // the scan instance num should not larger than the tablets num - return maxParallel; + return Math.min(maxParallel, Math.max(fragment.getParallelExecNum(), 1)); } protected List fillUpSingleEmptyInstance(DistributedPlanWorkerManager workerManager) {