@@ -116,20 +116,27 @@ fn filter_run_end_primitive<R: NativePType + AddAssign + From<bool> + AsPrimitiv
116116#[ cfg( test) ]
117117mod tests {
118118 use vortex_array:: IntoArray ;
119- use vortex_array:: LEGACY_SESSION ;
120119 use vortex_array:: VortexSessionExecute ;
121120 use vortex_array:: arrays:: PrimitiveArray ;
122121 use vortex_array:: assert_arrays_eq;
123122 use vortex_error:: VortexResult ;
124123 use vortex_mask:: Mask ;
124+ use vortex_session:: VortexSession ;
125125
126126 use crate :: RunEnd ;
127127 use crate :: RunEndArray ;
128128
129+ fn session ( ) -> VortexSession {
130+ let session = vortex_array:: array_session ( ) ;
131+ crate :: initialize ( & session) ;
132+ session
133+ }
134+
129135 fn ree_array ( ) -> RunEndArray {
136+ let session = session ( ) ;
130137 RunEnd :: encode (
131138 PrimitiveArray :: from_iter ( [ 1 , 1 , 1 , 4 , 4 , 4 , 2 , 2 , 5 , 5 , 5 , 5 ] ) . into_array ( ) ,
132- & mut LEGACY_SESSION . create_execution_ctx ( ) ,
139+ & mut session . create_execution_ctx ( ) ,
133140 )
134141 . unwrap ( )
135142 }
@@ -139,7 +146,8 @@ mod tests {
139146 let arr = ree_array ( ) . slice ( 2 ..7 ) ?;
140147 let filtered = arr. filter ( Mask :: from_iter ( [ true , false , false , true , true ] ) ) ?;
141148
142- let mut ctx = LEGACY_SESSION . create_execution_ctx ( ) ;
149+ let session = session ( ) ;
150+ let mut ctx = session. create_execution_ctx ( ) ;
143151 assert_arrays_eq ! (
144152 filtered,
145153 RunEnd :: new(
@@ -157,7 +165,8 @@ mod tests {
157165 /// Filter unwrap one layer at a time so RunEnd's FilterKernel can fire.
158166 #[ test]
159167 fn filter_sliced_run_end_preserves_encoding ( ) -> VortexResult < ( ) > {
160- let mut ctx = LEGACY_SESSION . create_execution_ctx ( ) ;
168+ let session = session ( ) ;
169+ let mut ctx = session. create_execution_ctx ( ) ;
161170
162171 // 4 runs of 32 each = 128 rows. Large enough that FilterKernel takes
163172 // the run-preserving path (true_count >= 25).
0 commit comments