@@ -13,7 +13,7 @@ use vortex_error::vortex_bail;
1313use vortex_proto:: expr as pb;
1414use vortex_session:: VortexSession ;
1515
16- use crate :: { ArrayRef , Columnar } ;
16+ use crate :: ArrayRef ;
1717use crate :: Canonical ;
1818use crate :: ExecutionCtx ;
1919use crate :: IntoArray ;
@@ -324,14 +324,13 @@ impl ScalarFnVTable for Between {
324324
325325#[ cfg( test) ]
326326mod tests {
327+ use std:: sync:: LazyLock ;
328+
327329 use rstest:: rstest;
328330 use vortex_buffer:: buffer;
329331
330332 use super :: * ;
331333 use crate :: IntoArray ;
332- use crate :: LEGACY_SESSION ;
333- #[ expect( deprecated) ]
334- use crate :: ToCanonical as _;
335334 use crate :: VortexSessionExecute ;
336335 use crate :: arrays:: BoolArray ;
337336 use crate :: arrays:: DecimalArray ;
@@ -346,9 +345,13 @@ mod tests {
346345 use crate :: expr:: root;
347346 use crate :: scalar:: DecimalValue ;
348347 use crate :: scalar:: Scalar ;
348+ use crate :: session:: ArraySession ;
349349 use crate :: test_harness:: to_int_indices;
350350 use crate :: validity:: Validity ;
351351
352+ static SESSION : LazyLock < VortexSession > =
353+ LazyLock :: new ( || VortexSession :: empty ( ) . with :: < ArraySession > ( ) ) ;
354+
352355 #[ test]
353356 fn test_display ( ) {
354357 let expr = between (
@@ -388,7 +391,6 @@ mod tests {
388391 let array = buffer ! [ 1 , 0 , 1 , 0 , 1 ] . into_array ( ) ;
389392 let upper = buffer ! [ 2 , 1 , 1 , 0 , 0 ] . into_array ( ) ;
390393
391- #[ expect( deprecated) ]
392394 let matches = between_canonical (
393395 & array,
394396 & lower,
@@ -397,10 +399,11 @@ mod tests {
397399 lower_strict,
398400 upper_strict,
399401 } ,
400- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
402+ & mut SESSION . create_execution_ctx ( ) ,
401403 )
402404 . unwrap ( )
403- . to_bool ( ) ;
405+ . execute :: < BoolArray > ( & mut SESSION . create_execution_ctx ( ) )
406+ . unwrap ( ) ;
404407
405408 let indices = to_int_indices ( matches) . unwrap ( ) ;
406409 assert_eq ! ( indices, expected) ;
@@ -418,7 +421,6 @@ mod tests {
418421 )
419422 . into_array ( ) ;
420423
421- #[ expect( deprecated) ]
422424 let matches = between_canonical (
423425 & array,
424426 & lower,
@@ -427,10 +429,11 @@ mod tests {
427429 lower_strict : StrictComparison :: NonStrict ,
428430 upper_strict : StrictComparison :: NonStrict ,
429431 } ,
430- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
432+ & mut SESSION . create_execution_ctx ( ) ,
431433 )
432434 . unwrap ( )
433- . to_bool ( ) ;
435+ . execute :: < BoolArray > ( & mut SESSION . create_execution_ctx ( ) )
436+ . unwrap ( ) ;
434437
435438 let indices = to_int_indices ( matches) . unwrap ( ) ;
436439 assert ! ( indices. is_empty( ) ) ;
@@ -446,10 +449,11 @@ mod tests {
446449 lower_strict : StrictComparison :: NonStrict ,
447450 upper_strict : StrictComparison :: NonStrict ,
448451 } ,
449- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
452+ & mut SESSION . create_execution_ctx ( ) ,
450453 )
451454 . unwrap ( )
452- . to_bool ( ) ;
455+ . execute :: < BoolArray > ( & mut SESSION . create_execution_ctx ( ) )
456+ . unwrap ( ) ;
453457 let indices = to_int_indices ( matches) . unwrap ( ) ;
454458 assert_eq ! ( indices, vec![ 0 , 1 , 3 ] ) ;
455459
@@ -465,10 +469,11 @@ mod tests {
465469 lower_strict : StrictComparison :: NonStrict ,
466470 upper_strict : StrictComparison :: NonStrict ,
467471 } ,
468- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
472+ & mut SESSION . create_execution_ctx ( ) ,
469473 )
470474 . unwrap ( )
471- . to_bool ( ) ;
475+ . execute :: < BoolArray > ( & mut SESSION . create_execution_ctx ( ) )
476+ . unwrap ( ) ;
472477 let indices = to_int_indices ( matches) . unwrap ( ) ;
473478 assert_eq ! ( indices, vec![ 0 , 1 , 2 , 3 , 4 ] ) ;
474479 }
@@ -507,7 +512,7 @@ mod tests {
507512 lower_strict : StrictComparison :: Strict ,
508513 upper_strict : StrictComparison :: NonStrict ,
509514 } ,
510- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
515+ & mut SESSION . create_execution_ctx ( ) ,
511516 )
512517 . unwrap ( ) ;
513518 assert_arrays_eq ! (
@@ -524,7 +529,7 @@ mod tests {
524529 lower_strict : StrictComparison :: NonStrict ,
525530 upper_strict : StrictComparison :: Strict ,
526531 } ,
527- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
532+ & mut SESSION . create_execution_ctx ( ) ,
528533 )
529534 . unwrap ( ) ;
530535 assert_arrays_eq ! (
0 commit comments