@@ -150,9 +150,12 @@ async fn list_files_with_session_level_cache() {
150
150
//Session 1 first time list files
151
151
assert_eq ! ( get_list_file_cache_size( & state1) , 0 ) ;
152
152
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 ( ) ;
156
159
157
160
assert_eq ! ( get_list_file_cache_size( & state1) , 1 ) ;
158
161
let fg = & parquet1. file_groups ;
@@ -163,9 +166,12 @@ async fn list_files_with_session_level_cache() {
163
166
//check session 1 cache result not show in session 2
164
167
assert_eq ! ( get_list_file_cache_size( & state2) , 0 ) ;
165
168
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 ( ) ;
169
175
170
176
assert_eq ! ( get_list_file_cache_size( & state2) , 1 ) ;
171
177
let fg2 = & parquet2. file_groups ;
@@ -176,9 +182,12 @@ async fn list_files_with_session_level_cache() {
176
182
//check session 1 cache result not show in session 2
177
183
assert_eq ! ( get_list_file_cache_size( & state1) , 1 ) ;
178
184
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 ( ) ;
182
191
183
192
assert_eq ! ( get_list_file_cache_size( & state1) , 1 ) ;
184
193
let fg = & parquet3. file_groups ;
0 commit comments