Skip to content

Commit 1f83b90

Browse files
committed
Resolved pipeline errors
- Removed unused include of LogicalPlan module in tpch.rs
1 parent ed5dd14 commit 1f83b90

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

benchmarks/src/bin/tpch.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use std::{
2828

2929
use datafusion::datasource::{MemTable, TableProvider};
3030
use datafusion::error::{DataFusionError, Result};
31-
use datafusion::logical_plan::LogicalPlan;
3231
use datafusion::parquet::basic::Compression;
3332
use datafusion::parquet::file::properties::WriterProperties;
3433
use datafusion::physical_plan::display::DisplayableExecutionPlan;
@@ -197,9 +196,9 @@ async fn benchmark_datafusion(opt: DataFusionBenchmarkOpt) -> Result<Vec<RecordB
197196
for i in 0..opt.iterations {
198197
let start = Instant::now();
199198

200-
let sql = &get_query_sql(n)?;
199+
let sql = &get_query_sql(opt.query)?;
201200
for query in sql {
202-
execute_query(&ctx, query, debug);
201+
result = execute_query(&ctx, query, opt.debug).await?;
203202
}
204203

205204
let elapsed = start.elapsed().as_secs_f64() * 1000.0;
@@ -273,7 +272,7 @@ fn get_query_sql(query: usize) -> Result<Vec<String>> {
273272

274273
async fn execute_query(
275274
ctx: &SessionContext,
276-
sql: &String,
275+
sql: &str,
277276
debug: bool,
278277
) -> Result<Vec<RecordBatch>> {
279278
let plan = ctx.sql(sql).await?;
@@ -1021,7 +1020,7 @@ mod tests {
10211020

10221021
let sql = &get_query_sql(n)?;
10231022
for query in sql {
1024-
execute_query(&ctx, query, debug);
1023+
execute_query(&ctx, query, false).await?;
10251024
}
10261025

10271026
Ok(())

0 commit comments

Comments
 (0)