Apache DataFusion SQL Query Engine
Minor: Log TPCH benchmark results (#6813)
Andrew Lambea71acff7956
diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.tomlindex 1d360739d8..f8ca0b2496 100644--- a/benchmarks/Cargo.toml+++ b/benchmarks/Cargo.toml@@ -37,6 +37,7 @@ arrow = { workspace = true }datafusion = { path = "../datafusion/core", version = "27.0.0" }env_logger = "0.10"futures = "0.3"+log = "^0.4"mimalloc = { version = "0.1", optional = true, default-features = false }num_cpus = "1.13.0"parquet = { workspace = true }diff --git a/benchmarks/src/bin/tpch.rs b/benchmarks/src/bin/tpch.rsindex 32359dc1f8..d18dd38b9b 100644--- a/benchmarks/src/bin/tpch.rs+++ b/benchmarks/src/bin/tpch.rs@@ -16,7 +16,9 @@// under the License.//! Benchmark derived from TPC-H. This is not an official TPC-H benchmark.+use log::info;+use arrow::util::pretty::pretty_format_batches;use datafusion::datasource::file_format::{csv::CsvFormat, FileFormat};use datafusion::datasource::{MemTable, TableProvider};use datafusion::error::{DataFusionError, Result};@@ -235,6 +237,7 @@ async fn benchmark_query(let elapsed = start.elapsed(); //.as_secs_f64() * 1000.0;let ms = elapsed.as_secs_f64() * 1000.0;millis.push(ms);+ info!("output:\n\n{}\n\n", pretty_format_batches(&result)?);let row_count = result.iter().map(|b| b.num_rows()).sum();println!("Query {query_id} iteration {i} took {ms:.1} ms and returned {row_count} rows"