@@ -23,17 +23,19 @@ use std::{
2323 sync:: Arc ,
2424} ;
2525
26- use arrow:: datatypes:: { DataType , Field , Schema } ;
27- use arrow:: util:: pretty;
26+ use datafusion:: arrow:: datatypes:: { DataType , Field , Schema } ;
27+ use datafusion:: arrow:: record_batch:: RecordBatch ;
28+ use datafusion:: arrow:: util:: pretty;
29+
2830use datafusion:: datasource:: parquet:: ParquetTable ;
2931use datafusion:: datasource:: { CsvFile , MemTable , TableProvider } ;
3032use datafusion:: error:: { DataFusionError , Result } ;
3133use datafusion:: logical_plan:: LogicalPlan ;
3234use datafusion:: physical_plan:: collect;
3335use datafusion:: prelude:: * ;
3436
35- use parquet:: basic:: Compression ;
36- use parquet:: file:: properties:: WriterProperties ;
37+ use datafusion :: parquet:: basic:: Compression ;
38+ use datafusion :: parquet:: file:: properties:: WriterProperties ;
3739use structopt:: StructOpt ;
3840
3941#[ cfg( feature = "snmalloc" ) ]
@@ -130,7 +132,7 @@ async fn main() -> Result<()> {
130132 }
131133}
132134
133- async fn benchmark ( opt : BenchmarkOpt ) -> Result < Vec < arrow :: record_batch :: RecordBatch > > {
135+ async fn benchmark ( opt : BenchmarkOpt ) -> Result < Vec < RecordBatch > > {
134136 println ! ( "Running benchmarks with the following options: {:?}" , opt) ;
135137 let config = ExecutionConfig :: new ( )
136138 . with_concurrency ( opt. concurrency )
@@ -165,7 +167,7 @@ async fn benchmark(opt: BenchmarkOpt) -> Result<Vec<arrow::record_batch::RecordB
165167
166168 let mut millis = vec ! [ ] ;
167169 // run benchmark
168- let mut result: Vec < arrow :: record_batch :: RecordBatch > = Vec :: with_capacity ( 1 ) ;
170+ let mut result: Vec < RecordBatch > = Vec :: with_capacity ( 1 ) ;
169171 for i in 0 ..opt. iterations {
170172 let start = Instant :: now ( ) ;
171173 let plan = create_logical_plan ( & mut ctx, opt. query ) ?;
@@ -1013,7 +1015,7 @@ async fn execute_query(
10131015 ctx : & mut ExecutionContext ,
10141016 plan : & LogicalPlan ,
10151017 debug : bool ,
1016- ) -> Result < Vec < arrow :: record_batch :: RecordBatch > > {
1018+ ) -> Result < Vec < RecordBatch > > {
10171019 if debug {
10181020 println ! ( "Logical plan:\n {:?}" , plan) ;
10191021 }
@@ -1237,9 +1239,8 @@ mod tests {
12371239 use std:: env;
12381240 use std:: sync:: Arc ;
12391241
1240- use arrow:: array:: * ;
1241- use arrow:: record_batch:: RecordBatch ;
1242- use arrow:: util:: display:: array_value_to_string;
1242+ use datafusion:: arrow:: array:: * ;
1243+ use datafusion:: arrow:: util:: display:: array_value_to_string;
12431244
12441245 use datafusion:: logical_plan:: Expr ;
12451246 use datafusion:: logical_plan:: Expr :: Cast ;
0 commit comments