File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pub(crate) const FL_CHUNK_SIZE: usize = 1024;
2121use bitpacking:: compute:: is_constant:: BitPackedIsConstantKernel ;
2222use r#for:: compute:: is_constant:: FoRIsConstantKernel ;
2323use r#for:: compute:: is_sorted:: FoRIsSortedKernel ;
24- use itertools:: Itertools ;
2524use vortex_array:: aggregate_fn:: AggregateFnVTable ;
2625use vortex_array:: aggregate_fn:: fns:: is_constant:: IsConstant ;
2726use 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 }
You can’t perform that action at this time.
0 commit comments