Skip to content

Commit a891151

Browse files
authored
Chore: rename apply patches (#5430)
Signed-off-by: Connor Tsui <[email protected]>
1 parent c2303e5 commit a891151

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub(crate) fn unpack_into_primitive_builder<T: BitPacked>(
5353
bit_packed_iter.decode_into(uninit_slice);
5454

5555
if let Some(patches) = array.patches() {
56-
apply_patches(&mut uninit_range, patches);
56+
apply_patches_to_uninit_range(&mut uninit_range, patches);
5757
};
5858

5959
// SAFETY: We have set a correct validity mask via `append_mask` with `array.len()` values and
@@ -63,11 +63,11 @@ pub(crate) fn unpack_into_primitive_builder<T: BitPacked>(
6363
}
6464
}
6565

66-
pub fn apply_patches<T: NativePType>(dst: &mut UninitRange<T>, patches: &Patches) {
67-
apply_patches_fn(dst, patches, |x| x)
66+
pub fn apply_patches_to_uninit_range<T: NativePType>(dst: &mut UninitRange<T>, patches: &Patches) {
67+
apply_patches_to_uninit_range_fn(dst, patches, |x| x)
6868
}
6969

70-
pub fn apply_patches_fn<T: NativePType, F: Fn(T) -> T>(
70+
pub fn apply_patches_to_uninit_range_fn<T: NativePType, F: Fn(T) -> T>(
7171
dst: &mut UninitRange<T>,
7272
patches: &Patches,
7373
f: F,
@@ -80,7 +80,7 @@ pub fn apply_patches_fn<T: NativePType, F: Fn(T) -> T>(
8080
let values = values.as_slice::<T>();
8181

8282
match_each_unsigned_integer_ptype!(indices.ptype(), |P| {
83-
insert_values_and_validity_at_indices(
83+
insert_values_and_validity_at_indices_to_uninit_range(
8484
dst,
8585
indices.as_slice::<P>(),
8686
values,
@@ -91,7 +91,11 @@ pub fn apply_patches_fn<T: NativePType, F: Fn(T) -> T>(
9191
});
9292
}
9393

94-
fn insert_values_and_validity_at_indices<T: NativePType, IndexT: IntegerPType, F: Fn(T) -> T>(
94+
fn insert_values_and_validity_at_indices_to_uninit_range<
95+
T: NativePType,
96+
IndexT: IntegerPType,
97+
F: Fn(T) -> T,
98+
>(
9599
dst: &mut UninitRange<T>,
96100
indices: &[IndexT],
97101
values: &[T],

encodings/fastlanes/src/for/compress.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ fn fused_decompress<T: PhysicalPType<Physical = T> + UnsignedPType + FoR + Wrapp
136136
unpacked.decode_into(uninit_slice);
137137

138138
if let Some(patches) = bp.patches() {
139-
bitpack_decompress::apply_patches_fn(&mut uninit_range, patches, |v| v.wrapping_add(&ref_));
139+
bitpack_decompress::apply_patches_to_uninit_range_fn(&mut uninit_range, patches, |v| {
140+
v.wrapping_add(&ref_)
141+
});
140142
};
141143

142144
// SAFETY: We have set a correct validity mask via `append_mask` with `array.len()` values and

0 commit comments

Comments
 (0)