mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-06-02 21:30:38 +00:00
feat: get uppoer bound for part nums
This commit is contained in:
@@ -131,7 +131,7 @@ impl ParallelizeScan {
|
|||||||
let total_rows = ranges.iter().map(|range| range.num_rows).sum::<usize>();
|
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.
|
// Computes the partition num by the max row number. This eliminates the unbalance of the partitions.
|
||||||
let balanced_partition_num = if max_rows > 0 {
|
let balanced_partition_num = if max_rows > 0 {
|
||||||
total_rows / max_rows
|
(total_rows + max_rows - 1) / max_rows
|
||||||
} else {
|
} else {
|
||||||
ranges.len()
|
ranges.len()
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user