@@ -95,10 +95,11 @@ mod setup {
9595
9696 /// Create FoR <- BitPacked encoding tree for u64
9797 pub fn for_bp_u64 ( ) -> ArrayRef {
98+ let mut ctx = LEGACY_SESSION . create_execution_ctx ( ) ;
9899 let ( uint_array, ..) = setup_primitive_arrays ( ) ;
99100 let compressed = FoR :: encode ( uint_array) . unwrap ( ) ;
100101 let inner = compressed. encoded ( ) ;
101- let bp = BitPacked :: encode ( inner, 8 ) . unwrap ( ) ;
102+ let bp = BitPacked :: encode ( inner, 8 , & mut ctx ) . unwrap ( ) ;
102103 FoR :: try_new ( bp. into_array ( ) , compressed. reference_scalar ( ) . clone ( ) )
103104 . unwrap ( )
104105 . into_array ( )
@@ -118,7 +119,7 @@ mod setup {
118119 . unwrap ( ) ;
119120 let for_array = FoR :: encode ( alp_encoded_prim) . unwrap ( ) ;
120121 let inner = for_array. encoded ( ) ;
121- let bp = BitPacked :: encode ( inner, 8 ) . unwrap ( ) ;
122+ let bp = BitPacked :: encode ( inner, 8 , & mut ctx ) . unwrap ( ) ;
122123 let for_with_bp =
123124 FoR :: try_new ( bp. into_array ( ) , for_array. reference_scalar ( ) . clone ( ) ) . unwrap ( ) ;
124125
@@ -153,7 +154,8 @@ mod setup {
153154 let codes_prim = PrimitiveArray :: from_iter ( codes) ;
154155
155156 // Compress codes with BitPacked (6 bits should be enough for ~50 unique values)
156- let codes_bp = BitPacked :: encode ( & codes_prim. into_array ( ) , 6 )
157+ let mut ctx = LEGACY_SESSION . create_execution_ctx ( ) ;
158+ let codes_bp = BitPacked :: encode ( & codes_prim. into_array ( ) , 6 , & mut ctx)
157159 . unwrap ( )
158160 . into_array ( ) ;
159161
@@ -195,7 +197,7 @@ mod setup {
195197 . unwrap ( ) ;
196198 let ends_for = FoR :: encode ( ends_prim) . unwrap ( ) ;
197199 let ends_inner = ends_for. encoded ( ) ;
198- let ends_bp = BitPacked :: encode ( ends_inner, 8 ) . unwrap ( ) ;
200+ let ends_bp = BitPacked :: encode ( ends_inner, 8 , & mut ctx ) . unwrap ( ) ;
199201 let compressed_ends =
200202 FoR :: try_new ( ends_bp. into_array ( ) , ends_for. reference_scalar ( ) . clone ( ) )
201203 . unwrap ( )
@@ -207,7 +209,7 @@ mod setup {
207209 . clone ( )
208210 . execute :: < PrimitiveArray > ( & mut ctx)
209211 . unwrap ( ) ;
210- let compressed_values = BitPacked :: encode ( & values_prim. into_array ( ) , 8 )
212+ let compressed_values = BitPacked :: encode ( & values_prim. into_array ( ) , 8 , & mut ctx )
211213 . unwrap ( )
212214 . into_array ( ) ;
213215
@@ -289,7 +291,7 @@ mod setup {
289291 . clone ( )
290292 . execute :: < PrimitiveArray > ( & mut ctx)
291293 . unwrap ( ) ;
292- let offsets_bp = BitPacked :: encode ( & offsets_prim. into_array ( ) , 20 ) . unwrap ( ) ;
294+ let offsets_bp = BitPacked :: encode ( & offsets_prim. into_array ( ) , 20 , & mut ctx ) . unwrap ( ) ;
293295
294296 // Rebuild VarBin with compressed offsets
295297 let compressed_codes = VarBinArray :: try_new (
@@ -350,7 +352,7 @@ mod setup {
350352 . unwrap ( ) ;
351353 let days_for = FoR :: encode ( days_prim) . unwrap ( ) ;
352354 let days_inner = days_for. encoded ( ) ;
353- let days_bp = BitPacked :: encode ( days_inner, 16 ) . unwrap ( ) ;
355+ let days_bp = BitPacked :: encode ( days_inner, 16 , & mut ctx ) . unwrap ( ) ;
354356 let compressed_days =
355357 FoR :: try_new ( days_bp. into_array ( ) , days_for. reference_scalar ( ) . clone ( ) )
356358 . unwrap ( )
@@ -364,7 +366,7 @@ mod setup {
364366 . unwrap ( ) ;
365367 let seconds_for = FoR :: encode ( seconds_prim) . unwrap ( ) ;
366368 let seconds_inner = seconds_for. encoded ( ) ;
367- let seconds_bp = BitPacked :: encode ( seconds_inner, 17 ) . unwrap ( ) ;
369+ let seconds_bp = BitPacked :: encode ( seconds_inner, 17 , & mut ctx ) . unwrap ( ) ;
368370 let compressed_seconds = FoR :: try_new (
369371 seconds_bp. into_array ( ) ,
370372 seconds_for. reference_scalar ( ) . clone ( ) ,
@@ -380,7 +382,7 @@ mod setup {
380382 . unwrap ( ) ;
381383 let subseconds_for = FoR :: encode ( subseconds_prim) . unwrap ( ) ;
382384 let subseconds_inner = subseconds_for. encoded ( ) ;
383- let subseconds_bp = BitPacked :: encode ( subseconds_inner, 20 ) . unwrap ( ) ;
385+ let subseconds_bp = BitPacked :: encode ( subseconds_inner, 20 , & mut ctx ) . unwrap ( ) ;
384386 let compressed_subseconds = FoR :: try_new (
385387 subseconds_bp. into_array ( ) ,
386388 subseconds_for. reference_scalar ( ) . clone ( ) ,
0 commit comments