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;
@@ -278,7 +279,14 @@ async fn register_benchmark_tables<B: Benchmark + ?Sized>(
278279 None => config. infer_schema ( & session. state ( ) ) . await ?,
279280 } ;
280281
281- let listing_table = Arc :: new ( ListingTable :: try_new ( config) ?) ;
282+ let listing_table = Arc :: new (
283+ ListingTable :: try_new ( config) ?. with_cache (
284+ session
285+ . runtime_env ( )
286+ . cache_manager
287+ . get_file_statistic_cache ( ) ,
288+ ) ,
289+ ) ;
282290
283291 session. register_table ( table. name , listing_table) ?;
284292 }
You can’t perform that action at this time.
0 commit comments