From 7e4d8f4d90d5abc8ab2806e3485596c9f9aaa71e Mon Sep 17 00:00:00 2001 From: Simon Lin Date: Tue, 12 Nov 2024 16:01:13 +1100 Subject: [PATCH] c --- crates/polars-io/src/cloud/polars_object_store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/polars-io/src/cloud/polars_object_store.rs b/crates/polars-io/src/cloud/polars_object_store.rs index 3028ef419924..ceb82488fa09 100644 --- a/crates/polars-io/src/cloud/polars_object_store.rs +++ b/crates/polars-io/src/cloud/polars_object_store.rs @@ -319,12 +319,12 @@ fn merge_ranges(ranges: &[Range]) -> impl Iterator, }; let should_merge = is_overlapping || { - let le_existing_chunk_size_dist = new_merged.len().abs_diff(chunk_size) + let leq_existing_chunk_size_dist = new_merged.len().abs_diff(chunk_size) <= current_merged_range.len().abs_diff(chunk_size); let gap_tolerance = (current_n_bytes.max(range.len()) / 8).clamp(1024 * 1024, 8 * 1024 * 1024); - le_existing_chunk_size_dist && distance <= gap_tolerance + leq_existing_chunk_size_dist && distance <= gap_tolerance }; if should_merge {