Skip to content

Commit e40d7f1

Browse files
committed
fixes
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent 8e47320 commit e40d7f1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

encodings/fastlanes/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pub(crate) const FL_CHUNK_SIZE: usize = 1024;
2121
use bitpacking::compute::is_constant::BitPackedIsConstantKernel;
2222
use r#for::compute::is_constant::FoRIsConstantKernel;
2323
use r#for::compute::is_sorted::FoRIsSortedKernel;
24-
use itertools::Itertools;
2524
use vortex_array::aggregate_fn::AggregateFnVTable;
2625
use vortex_array::aggregate_fn::fns::is_constant::IsConstant;
2726
use vortex_array::aggregate_fn::fns::is_sorted::IsSorted;
@@ -84,14 +83,17 @@ pub(crate) fn fill_forward_nulls<T: Copy + Default>(
8483
Err(to_fill) => {
8584
let mut to_fill_mut = BufferMut::<T>::with_capacity(to_fill.len());
8685
let mut last_valid = T::default();
87-
for (i, (v, out)) in to_fill.iter().zip_eq(to_fill_mut.iter_mut()).enumerate() {
86+
for (i, (v, out)) in to_fill
87+
.iter()
88+
.zip(to_fill_mut.spare_capacity_mut().iter_mut())
89+
.enumerate()
90+
{
8891
if bit_buffer.value(i) {
8992
last_valid = *v;
90-
*out = *v;
91-
} else {
92-
*out = last_valid;
9393
}
94+
out.write(last_valid);
9495
}
96+
unsafe { to_fill_mut.set_len(to_fill.len()) };
9597
to_fill_mut.freeze()
9698
}
9799
}

0 commit comments

Comments
 (0)