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 @@ -386,16 +386,16 @@ mod tests {
386386 let clobbered_indices =
387387 PrimitiveArray :: new ( Buffer :: from ( indices_data) , indices_prim. validity ( ) ) . into_array ( ) ;
388388
389- Ok ( unsafe {
390- RLEArra :: new_unchecked (
389+ unsafe {
390+ RLEArray :: try_from_data ( RLEData :: new_unchecked (
391391 rle. values ( ) . clone ( ) ,
392392 clobbered_indices,
393393 rle. values_idx_offsets ( ) . clone ( ) ,
394394 rle. dtype ( ) . clone ( ) ,
395395 rle. offset ( ) ,
396396 rle. len ( ) ,
397- )
398- } )
397+ ) )
398+ }
399399 }
400400
401401 #[ 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 ;
@@ -24,10 +25,6 @@ use crate::rle::RLEArrayExt;
2425 reason = "complexity is from nested match_each_* macros"
2526) ]
2627pub fn rle_decompress ( array : & RLEArray , ctx : & mut ExecutionCtx ) -> VortexResult < PrimitiveArray > {
27- if array. all_invalid ( ) ? {
28- return Ok ( Canonical :: empty ( array. dtype ( ) ) . into_primitive ( ) ) ;
29- }
30-
3128 match_each_native_ptype ! ( array. values( ) . dtype( ) . as_ptype( ) , |V | {
3229 match_each_unsigned_integer_ptype!( array. values_idx_offsets( ) . dtype( ) . as_ptype( ) , |O | {
3330 // RLE indices are always u16 (or u8 if downcasted).
You can’t perform that action at this time.
0 commit comments