Skip to content

Commit 3bc6a4e

Browse files
author
umi
committed
fmt
1 parent cc2032f commit 3bc6a4e

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

crates/paimon/src/arrow/format/parquet.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -993,14 +993,11 @@ fn merge_byte_ranges(ranges: &[Range<u64>], coalesce: u64) -> Vec<Range<u64>> {
993993
}
994994

995995
/// Split merged ranges into fixed-size batches to utilize concurrency,
996-
/// Each merged range is divided into chunks of `expected_size`,
997-
/// with the last chunk taking whatever remains.
996+
/// Each merged range is divided into chunks of `expected_size`,
997+
/// with the last chunk taking whatever remains.
998998
/// Ranges smaller than `2 * MIN_SPLIT_SIZE` are kept as-is to
999999
/// avoid excessive small IO requests.
1000-
fn split_ranges_for_concurrency(
1001-
merged: Vec<Range<u64>>,
1002-
target_count: usize,
1003-
) -> Vec<Range<u64>> {
1000+
fn split_ranges_for_concurrency(merged: Vec<Range<u64>>, target_count: usize) -> Vec<Range<u64>> {
10041001
if merged.is_empty() || target_count <= 1 {
10051002
return merged;
10061003
}
@@ -1009,12 +1006,6 @@ fn split_ranges_for_concurrency(
10091006

10101007
for range in &merged {
10111008
let length = range.end - range.start;
1012-
1013-
if length < MIN_SPLIT_SIZE * 2 {
1014-
result.push(range.clone());
1015-
continue;
1016-
}
1017-
10181009
let expected_size = MIN_SPLIT_SIZE.max(length / target_count as u64 + 1);
10191010
let min_remain = expected_size.max(MIN_SPLIT_SIZE * 2);
10201011

0 commit comments

Comments
 (0)