Skip to content

Apache DataFusion SQL Query Engine

tpch: move reading of SQL queries out of timed span. (#16357)

Pepijn Van Eeckhoudtb41acf3c43ff
diff --git a/benchmarks/src/tpch/run.rs b/benchmarks/src/tpch/run.rs
index c042b34180..20867991f2 100644
--- a/benchmarks/src/tpch/run.rs
+++ b/benchmarks/src/tpch/run.rs
@@ -147,11 +147,12 @@ impl RunOpt {
let mut millis = vec![];
// run benchmark
let mut query_results = vec![];
+
+ let sql = &get_query_sql(query_id)?;
+
for i in 0..self.iterations() {
let start = Instant::now();
- let sql = &get_query_sql(query_id)?;
-
// query 15 is special, with 3 statements. the second statement is the one from which we
// want to capture the results
let mut result = vec![];