feat: get uppoer bound for part nums

This commit is contained in:
evenyag
2024-12-03 15:59:01 +08:00
parent b74fb7be49
commit 8a357d93a6

View File

@@ -131,7 +131,7 @@ impl ParallelizeScan {
let total_rows = ranges.iter().map(|range| range.num_rows).sum::<usize>();
// Computes the partition num by the max row number. This eliminates the unbalance of the partitions.
let balanced_partition_num = if max_rows > 0 {
total_rows / max_rows
(total_rows + max_rows - 1) / max_rows
} else {
ranges.len()
};