File tree Expand file tree Collapse file tree
benchmarks/datafusion-bench/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ use datafusion::datasource::listing::ListingOptions;
1515use datafusion:: datasource:: listing:: ListingTable ;
1616use datafusion:: datasource:: listing:: ListingTableConfig ;
1717use datafusion:: datasource:: listing:: ListingTableUrl ;
18+ use datafusion:: execution:: cache:: file_statistics_cache:: DefaultFileStatisticsCache ;
1819use datafusion:: parquet:: arrow:: ParquetRecordBatchStreamBuilder ;
1920use datafusion:: prelude:: SessionContext ;
2021use datafusion_bench:: format_to_df_format;
@@ -288,7 +289,14 @@ async fn register_benchmark_tables<B: Benchmark + ?Sized>(
288289 None => config. infer_schema ( & session. state ( ) ) . await ?,
289290 } ;
290291
291- let listing_table = Arc :: new ( ListingTable :: try_new ( config) ?) ;
292+ let listing_table = Arc :: new (
293+ ListingTable :: try_new ( config) ?. with_cache (
294+ session
295+ . runtime_env ( )
296+ . cache_manager
297+ . get_file_statistic_cache ( ) ,
298+ ) ,
299+ ) ;
292300
293301 session. register_table ( table. name , listing_table) ?;
294302 }
You can’t perform that action at this time.
0 commit comments