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::{self, 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 ,
@@ -342,11 +342,15 @@ impl RunOpt {
342342 let data_path = crate_path. join ( "data" ) ;
343343 let entries = fs:: read_dir ( & data_path) ?. collect :: < Result < Vec < _ > , _ > > ( ) ?;
344344 if entries. is_empty ( ) {
345- exec_err ! ( "No TPCH dataset present in '{data_path:?}'. Generate one with ./benchmarks/gen-tpch.sh" )
345+ exec_err ! (
346+ "No TPCH dataset present in '{data_path:?}'. Generate one with ./benchmarks/gen-tpch.sh"
347+ )
346348 } else if entries. len ( ) == 1 {
347349 Ok ( entries[ 0 ] . path ( ) )
348350 } else {
349- exec_err ! ( "Multiple TPCH datasets present in '{data_path:?}'. One must be selected with --path" )
351+ exec_err ! (
352+ "Multiple TPCH datasets present in '{data_path:?}'. One must be selected with --path"
353+ )
350354 }
351355 }
352356
0 commit comments