@@ -150,9 +150,12 @@ async fn list_files_with_session_level_cache() {
150150 //Session 1 first time list files
151151 assert_eq ! ( get_list_file_cache_size( & state1) , 0 ) ;
152152 let exec1 = table1. scan ( & state1, None , & [ ] , None ) . await . unwrap ( ) ;
153- let data_source = exec1. as_any ( ) . downcast_ref :: < DataSourceExec > ( ) . unwrap ( ) ;
154- let source = data_source. source ( ) ;
155- let parquet1 = source. as_any ( ) . downcast_ref :: < FileScanConfig > ( ) . unwrap ( ) ;
153+ let data_source_exec = exec1. as_any ( ) . downcast_ref :: < DataSourceExec > ( ) . unwrap ( ) ;
154+ let data_source = data_source_exec. data_source ( ) ;
155+ let parquet1 = data_source
156+ . as_any ( )
157+ . downcast_ref :: < FileScanConfig > ( )
158+ . unwrap ( ) ;
156159
157160 assert_eq ! ( get_list_file_cache_size( & state1) , 1 ) ;
158161 let fg = & parquet1. file_groups ;
@@ -163,9 +166,12 @@ async fn list_files_with_session_level_cache() {
163166 //check session 1 cache result not show in session 2
164167 assert_eq ! ( get_list_file_cache_size( & state2) , 0 ) ;
165168 let exec2 = table2. scan ( & state2, None , & [ ] , None ) . await . unwrap ( ) ;
166- let data_source = exec2. as_any ( ) . downcast_ref :: < DataSourceExec > ( ) . unwrap ( ) ;
167- let source = data_source. source ( ) ;
168- let parquet2 = source. as_any ( ) . downcast_ref :: < FileScanConfig > ( ) . unwrap ( ) ;
169+ let data_source_exec = exec2. as_any ( ) . downcast_ref :: < DataSourceExec > ( ) . unwrap ( ) ;
170+ let data_source = data_source_exec. data_source ( ) ;
171+ let parquet2 = data_source
172+ . as_any ( )
173+ . downcast_ref :: < FileScanConfig > ( )
174+ . unwrap ( ) ;
169175
170176 assert_eq ! ( get_list_file_cache_size( & state2) , 1 ) ;
171177 let fg2 = & parquet2. file_groups ;
@@ -176,9 +182,12 @@ async fn list_files_with_session_level_cache() {
176182 //check session 1 cache result not show in session 2
177183 assert_eq ! ( get_list_file_cache_size( & state1) , 1 ) ;
178184 let exec3 = table1. scan ( & state1, None , & [ ] , None ) . await . unwrap ( ) ;
179- let data_source = exec3. as_any ( ) . downcast_ref :: < DataSourceExec > ( ) . unwrap ( ) ;
180- let source = data_source. source ( ) ;
181- let parquet3 = source. as_any ( ) . downcast_ref :: < FileScanConfig > ( ) . unwrap ( ) ;
185+ let data_source_exec = exec3. as_any ( ) . downcast_ref :: < DataSourceExec > ( ) . unwrap ( ) ;
186+ let data_source = data_source_exec. data_source ( ) ;
187+ let parquet3 = data_source
188+ . as_any ( )
189+ . downcast_ref :: < FileScanConfig > ( )
190+ . unwrap ( ) ;
182191
183192 assert_eq ! ( get_list_file_cache_size( & state1) , 1 ) ;
184193 let fg = & parquet3. file_groups ;
0 commit comments