You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ag...@apache.org on 2022/10/27 16:32:27 UTC
[arrow-datafusion] branch master updated: Stop pretty printing in benchmark when there are no results (#3974)
This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 6860ae455 Stop pretty printing in benchmark when there are no results (#3974)
6860ae455 is described below
commit 6860ae455c954a3d52b8ed5278e600507104878c
Author: Andy Grove <an...@gmail.com>
AuthorDate: Thu Oct 27 10:32:21 2022 -0600
Stop pretty printing in benchmark when there are no results (#3974)
---
benchmarks/src/bin/tpch.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/benchmarks/src/bin/tpch.rs b/benchmarks/src/bin/tpch.rs
index 7a914b19b..02de551f2 100644
--- a/benchmarks/src/bin/tpch.rs
+++ b/benchmarks/src/bin/tpch.rs
@@ -326,7 +326,11 @@ async fn execute_query(
"=== Physical plan with metrics ===\n{}\n",
DisplayableExecutionPlan::with_metrics(physical_plan.as_ref()).indent()
);
- pretty::print_batches(&result)?;
+ if !result.is_empty() {
+ // do not call print_batches if there are no batches as the result is confusing
+ // and makes it look like there is a batch with no columns
+ pretty::print_batches(&result)?;
+ }
}
Ok(result)
}