11// SPDX-License-Identifier: Apache-2.0
22// SPDX-FileCopyrightText: Copyright the Vortex contributors
33
4+ use std:: iter:: repeat_n;
45use std:: sync:: LazyLock ;
56
7+ use pco:: DEFAULT_MAX_PAGE_N ;
68use rstest:: rstest;
79use vortex_array:: ArrayRef ;
810use vortex_array:: IntoArray ;
@@ -17,10 +19,11 @@ use vortex_error::VortexResult;
1719use vortex_session:: VortexSession ;
1820
1921use crate :: Pco ;
22+ use crate :: initialize;
2023
2124static SESSION : LazyLock < VortexSession > = LazyLock :: new ( || {
2225 let session = VortexSession :: empty ( ) ;
23- crate :: initialize ( & session) ;
26+ initialize ( & session) ;
2427 session
2528} ) ;
2629
@@ -97,7 +100,7 @@ fn rejects_invalid_indices_and_descriptors() -> VortexResult<()> {
97100#[ test]
98101fn large_public_compressor_selections ( ) -> VortexResult < ( ) > {
99102 let mut ctx = SESSION . create_execution_ctx ( ) ;
100- let len = pco :: DEFAULT_MAX_PAGE_N + 257 ;
103+ let len = DEFAULT_MAX_PAGE_N + 257 ;
101104 let input = PrimitiveArray :: from_iter (
102105 ( 0 ..len) . map ( |i| u32:: try_from ( i) . vortex_expect ( "fixture fits u32" ) ) ,
103106 ) ;
@@ -153,7 +156,7 @@ fn mixed_fragments_narrow_slices_and_compact_repeats() -> VortexResult<()> {
153156 ) ?
154157 . into_array ( ) ;
155158 let expected = PrimitiveArray :: from_option_iter (
156- std :: iter :: repeat_n ( Some ( 11i64 ) , 500000 ) . chain ( std :: iter :: repeat_n ( None , 500000 ) ) ,
159+ repeat_n ( Some ( 11i64 ) , 500000 ) . chain ( repeat_n ( None , 500000 ) ) ,
157160 ) ;
158161 assert_arrays_eq ! ( encoded. take( compact) ?, expected, & mut ctx) ;
159162 let nulls = PrimitiveArray :: new ( vec ! [ 0i64 ; 100000 ] , Validity :: AllInvalid ) ;
0 commit comments