1616// under the License.
1717
1818use super :: {
19- get_query_sql , get_tbl_tpch_table_schema , get_tpch_table_schema , TPCH_QUERY_END_ID ,
20- TPCH_QUERY_START_ID , TPCH_TABLES ,
19+ TPCH_QUERY_END_ID , TPCH_QUERY_START_ID , TPCH_TABLES , get_query_sql , get_tbl_tpch_table_schema ,
20+ get_tpch_table_schema ,
2121} ;
2222use crate :: util:: {
2323 BenchmarkRun , CommonOpt , InMemoryCacheExecCodec , InMemoryDataSourceRule , QueryIter ,
@@ -29,21 +29,21 @@ use datafusion::arrow::util::pretty::pretty_format_batches;
2929use datafusion:: common:: instant:: Instant ;
3030use datafusion:: common:: tree_node:: { Transformed , TreeNode } ;
3131use datafusion:: common:: utils:: get_available_parallelism;
32- use datafusion:: common:: { exec_err, DEFAULT_CSV_EXTENSION , DEFAULT_PARQUET_EXTENSION } ;
32+ use datafusion:: common:: { DEFAULT_CSV_EXTENSION , DEFAULT_PARQUET_EXTENSION , exec_err} ;
33+ use datafusion:: datasource:: TableProvider ;
34+ use datafusion:: datasource:: file_format:: FileFormat ;
3335use datafusion:: datasource:: file_format:: csv:: CsvFormat ;
3436use datafusion:: datasource:: file_format:: parquet:: ParquetFormat ;
35- use datafusion:: datasource:: file_format:: FileFormat ;
3637use datafusion:: datasource:: listing:: {
3738 ListingOptions , ListingTable , ListingTableConfig , ListingTableUrl ,
3839} ;
39- use datafusion:: datasource:: TableProvider ;
4040use datafusion:: error:: { DataFusionError , Result } ;
4141use datafusion:: execution:: { SessionState , SessionStateBuilder } ;
4242use datafusion:: physical_plan:: display:: DisplayableExecutionPlan ;
4343use datafusion:: physical_plan:: { collect, displayable} ;
4444use datafusion:: prelude:: * ;
4545use datafusion_distributed:: test_utils:: localhost:: {
46- spawn_flight_service , LocalHostChannelResolver ,
46+ LocalHostChannelResolver , spawn_flight_service ,
4747} ;
4848use datafusion_distributed:: {
4949 DistributedExt , DistributedPhysicalOptimizerRule , DistributedSessionBuilder ,
@@ -354,11 +354,15 @@ impl RunOpt {
354354 let data_path = crate_path. join ( "data" ) ;
355355 let entries = fs:: read_dir ( & data_path) ?. collect :: < Result < Vec < _ > , _ > > ( ) ?;
356356 if entries. is_empty ( ) {
357- exec_err ! ( "No TPCH dataset present in '{data_path:?}'. Generate one with ./benchmarks/gen-tpch.sh" )
357+ exec_err ! (
358+ "No TPCH dataset present in '{data_path:?}'. Generate one with ./benchmarks/gen-tpch.sh"
359+ )
358360 } else if entries. len ( ) == 1 {
359361 Ok ( entries[ 0 ] . path ( ) )
360362 } else {
361- exec_err ! ( "Multiple TPCH datasets present in '{data_path:?}'. One must be selected with --path" )
363+ exec_err ! (
364+ "Multiple TPCH datasets present in '{data_path:?}'. One must be selected with --path"
365+ )
362366 }
363367 }
364368
0 commit comments