File tree Expand file tree Collapse file tree
encodings/fastlanes/src/rle/array Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -380,16 +380,16 @@ mod tests {
380380 let clobbered_indices =
381381 PrimitiveArray :: new ( Buffer :: from ( indices_data) , indices_prim. validity ( ) ) . into_array ( ) ;
382382
383- Ok ( unsafe {
384- RLEArra :: new_unchecked (
383+ unsafe {
384+ RLEArray :: try_from_data ( RLEData :: new_unchecked (
385385 rle. values ( ) . clone ( ) ,
386386 clobbered_indices,
387387 rle. values_idx_offsets ( ) . clone ( ) ,
388388 rle. dtype ( ) . clone ( ) ,
389389 rle. offset ( ) ,
390390 rle. len ( ) ,
391- )
392- } )
391+ ) )
392+ }
393393 }
394394
395395 #[ test]
Original file line number Diff line number Diff line change 33
44use fastlanes:: RLE ;
55use num_traits:: AsPrimitive ;
6+ use num_traits:: NumCast ;
67use vortex_array:: ExecutionCtx ;
78use vortex_array:: IntoArray ;
89use vortex_array:: arrays:: PrimitiveArray ;
@@ -23,10 +24,6 @@ use crate::RLEArray;
2324 reason = "complexity is from nested match_each_* macros"
2425) ]
2526pub fn rle_decompress ( array : & RLEArray , ctx : & mut ExecutionCtx ) -> VortexResult < PrimitiveArray > {
26- if array. all_invalid ( ) ? {
27- return Ok ( Canonical :: empty ( array. dtype ( ) ) . into_primitive ( ) ) ;
28- }
29-
3027 match_each_native_ptype ! ( array. values( ) . dtype( ) . as_ptype( ) , |V | {
3128 match_each_unsigned_integer_ptype!( array. values_idx_offsets( ) . dtype( ) . as_ptype( ) , |O | {
3229 // RLE indices are always u16 (or u8 if downcasted).
You can’t perform that action at this time.
0 commit comments