@@ -140,17 +140,17 @@ impl VTable for ALPVTable {
140140 )
141141 }
142142
143- fn execute ( array : & ALPArray , ctx : & mut ExecutionCtx ) -> VortexResult < Vector > {
144- let encoded_vector = array. encoded ( ) . execute ( ctx) ?;
143+ fn batch_execute ( array : & ALPArray , ctx : & mut ExecutionCtx ) -> VortexResult < Vector > {
144+ let encoded_vector = array. encoded ( ) . batch_execute ( ctx) ?;
145145
146146 let patches_vectors = if let Some ( patches) = array. patches ( ) {
147147 Some ( (
148- patches. indices ( ) . execute ( ctx) ?,
149- patches. values ( ) . execute ( ctx) ?,
148+ patches. indices ( ) . batch_execute ( ctx) ?,
149+ patches. values ( ) . batch_execute ( ctx) ?,
150150 patches
151151 . chunk_offsets ( )
152152 . as_ref ( )
153- . map ( |co| co. execute ( ctx) )
153+ . map ( |co| co. batch_execute ( ctx) )
154154 . transpose ( ) ?,
155155 ) )
156156 } else {
@@ -464,7 +464,7 @@ mod tests {
464464
465465 use super :: * ;
466466
467- static SESSION : LazyLock < VortexSession > = LazyLock :: new ( || VortexSession :: empty ( ) ) ;
467+ static SESSION : LazyLock < VortexSession > = LazyLock :: new ( VortexSession :: empty) ;
468468
469469 #[ rstest]
470470 #[ case( 0 ) ]
@@ -480,10 +480,7 @@ mod tests {
480480 let values = PrimitiveArray :: from_iter ( ( 0 ..size) . map ( |i| i as f32 ) ) ;
481481 let encoded = alp_encode ( & values, None ) . unwrap ( ) ;
482482
483- let result_vector = encoded
484- . to_array ( )
485- . execute ( & mut ExecutionCtx :: new ( SESSION . clone ( ) ) )
486- . unwrap ( ) ;
483+ let result_vector = encoded. to_array ( ) . execute ( & SESSION ) . unwrap ( ) ;
487484 // Compare against the traditional array-based decompress path
488485 let expected = decompress_into_array ( encoded) ;
489486
@@ -507,10 +504,7 @@ mod tests {
507504 let values = PrimitiveArray :: from_iter ( ( 0 ..size) . map ( |i| i as f64 ) ) ;
508505 let encoded = alp_encode ( & values, None ) . unwrap ( ) ;
509506
510- let result_vector = encoded
511- . to_array ( )
512- . execute ( & mut ExecutionCtx :: new ( SESSION . clone ( ) ) )
513- . unwrap ( ) ;
507+ let result_vector = encoded. to_array ( ) . execute ( & SESSION ) . unwrap ( ) ;
514508 // Compare against the traditional array-based decompress path
515509 let expected = decompress_into_array ( encoded) ;
516510
@@ -540,10 +534,7 @@ mod tests {
540534 let encoded = alp_encode ( & array, None ) . unwrap ( ) ;
541535 assert ! ( encoded. patches( ) . unwrap( ) . array_len( ) > 0 ) ;
542536
543- let result_vector = encoded
544- . to_array ( )
545- . execute ( & mut ExecutionCtx :: new ( SESSION . clone ( ) ) )
546- . unwrap ( ) ;
537+ let result_vector = encoded. to_array ( ) . execute ( & SESSION ) . unwrap ( ) ;
547538 // Compare against the traditional array-based decompress path
548539 let expected = decompress_into_array ( encoded) ;
549540
@@ -571,10 +562,7 @@ mod tests {
571562 let array = PrimitiveArray :: from_option_iter ( values) ;
572563 let encoded = alp_encode ( & array, None ) . unwrap ( ) ;
573564
574- let result_vector = encoded
575- . to_array ( )
576- . execute ( & mut ExecutionCtx :: new ( SESSION . clone ( ) ) )
577- . unwrap ( ) ;
565+ let result_vector = encoded. to_array ( ) . execute ( & SESSION ) . unwrap ( ) ;
578566 // Compare against the traditional array-based decompress path
579567 let expected = decompress_into_array ( encoded) ;
580568
@@ -613,10 +601,7 @@ mod tests {
613601 let encoded = alp_encode ( & array, None ) . unwrap ( ) ;
614602 assert ! ( encoded. patches( ) . unwrap( ) . array_len( ) > 0 ) ;
615603
616- let result_vector = encoded
617- . to_array ( )
618- . execute ( & mut ExecutionCtx :: new ( SESSION . clone ( ) ) )
619- . unwrap ( ) ;
604+ let result_vector = encoded. to_array ( ) . execute ( & SESSION ) . unwrap ( ) ;
620605 // Compare against the traditional array-based decompress path
621606 let expected = decompress_into_array ( encoded) ;
622607
@@ -658,9 +643,7 @@ mod tests {
658643 let slice_len = slice_end - slice_start;
659644 let sliced_encoded = encoded. slice ( slice_start..slice_end) ;
660645
661- let result_vector = sliced_encoded
662- . execute ( & mut ExecutionCtx :: new ( SESSION . clone ( ) ) )
663- . unwrap ( ) ;
646+ let result_vector = sliced_encoded. execute ( & SESSION ) . unwrap ( ) ;
664647 let result_primitive = result_vector. into_primitive ( ) . into_f64 ( ) ;
665648
666649 for idx in 0 ..slice_len {
0 commit comments