@@ -5,7 +5,9 @@ use std::fmt::Display;
55use std:: fmt:: Formatter ;
66
77use vortex_array:: ArrayRef ;
8+ use vortex_array:: LEGACY_SESSION ;
89use vortex_array:: TypedArrayRef ;
10+ use vortex_array:: VortexSessionExecute ;
911use vortex_error:: VortexExpect as _;
1012use vortex_error:: VortexResult ;
1113use vortex_error:: vortex_ensure;
@@ -111,24 +113,14 @@ pub trait RLEArrayExt: TypedArrayRef<crate::RLE> {
111113 ) ]
112114 fn values_idx_offset ( & self , chunk_idx : usize ) -> usize {
113115 self . values_idx_offsets ( )
114- . execute_scalar (
115- chunk_idx,
116- & mut vortex_array:: VortexSessionExecute :: create_execution_ctx (
117- & * vortex_array:: LEGACY_SESSION ,
118- ) ,
119- )
116+ . execute_scalar ( chunk_idx, & mut LEGACY_SESSION . create_execution_ctx ( ) )
120117 . expect ( "index must be in bounds" )
121118 . as_primitive ( )
122119 . as_ :: < usize > ( )
123120 . expect ( "index must be of type usize" )
124121 - self
125122 . values_idx_offsets ( )
126- . execute_scalar (
127- 0 ,
128- & mut vortex_array:: VortexSessionExecute :: create_execution_ctx (
129- & * vortex_array:: LEGACY_SESSION ,
130- ) ,
131- )
123+ . execute_scalar ( 0 , & mut LEGACY_SESSION . create_execution_ctx ( ) )
132124 . expect ( "index must be in bounds" )
133125 . as_primitive ( )
134126 . as_ :: < usize > ( )
@@ -147,6 +139,7 @@ impl<T: TypedArrayRef<crate::RLE>> RLEArrayExt for T {}
147139#[ cfg( test) ]
148140mod tests {
149141 use vortex_array:: ArrayContext ;
142+ use vortex_array:: Canonical ;
150143 use vortex_array:: IntoArray ;
151144 use vortex_array:: LEGACY_SESSION ;
152145 use vortex_array:: ToCanonical ;
@@ -279,7 +272,7 @@ mod tests {
279272 let invalid_slice = rle_array
280273 . slice ( 2 ..5 )
281274 . unwrap ( )
282- . to_canonical ( )
275+ . execute :: < Canonical > ( & mut LEGACY_SESSION . create_execution_ctx ( ) )
283276 . unwrap ( )
284277 . into_primitive ( ) ;
285278 let mut ctx = SESSION . create_execution_ctx ( ) ;
0 commit comments