@@ -160,11 +160,11 @@ impl CachedArrayReader {
160160 // Store in both shared cache and local cache
161161 // The shared cache is used to reuse results between readers
162162 // The local cache ensures data is available for our consume_batch call
163- let _cached =
164- self . shared_cache
165- . lock ( )
166- . unwrap ( )
167- . insert ( self . column_idx , batch_id , cached_batch . clone ( ) ) ;
163+ let _cached = self . shared_cache . lock ( ) . unwrap ( ) . insert (
164+ self . column_idx ,
165+ batch_id ,
166+ cached_batch . clone ( ) ,
167+ ) ;
168168 // Note: if the shared cache is full (_cached == false), we continue without caching
169169 // The local cache will still store the data for this reader's use
170170
@@ -328,7 +328,10 @@ impl ArrayReader for CachedArrayReader {
328328 // so we can return Some([]) instead of None to indicate this reader provides levels.
329329 // Check local cache first, then shared cache (since skip_records doesn't populate local cache)
330330 let cached_batch = self . local_cache . get ( & batch_id) . cloned ( ) . or_else ( || {
331- self . shared_cache . lock ( ) . unwrap ( ) . get ( self . column_idx , batch_id)
331+ self . shared_cache
332+ . lock ( )
333+ . unwrap ( )
334+ . get ( self . column_idx , batch_id)
332335 } ) ;
333336 if let Some ( batch) = cached_batch {
334337 if batch. def_levels . is_some ( ) {
@@ -1061,11 +1064,8 @@ mod tests {
10611064 let def_levels = vec ! [ 1 , 0 , 1 , 1 , 0 ] ;
10621065 let rep_levels = vec ! [ 0 , 1 , 0 , 1 , 1 ] ;
10631066
1064- let mock_reader = MockArrayReaderWithLevels :: new (
1065- data. clone ( ) ,
1066- def_levels. clone ( ) ,
1067- rep_levels. clone ( ) ,
1068- ) ;
1067+ let mock_reader =
1068+ MockArrayReaderWithLevels :: new ( data. clone ( ) , def_levels. clone ( ) , rep_levels. clone ( ) ) ;
10691069 let mut producer = CachedArrayReader :: new (
10701070 Box :: new ( mock_reader) ,
10711071 cache. clone ( ) ,
0 commit comments