Skip to content

Commit

Permalink
Stop pretty printing in benchmark when there are no results (apache#3974
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andygrove authored Oct 27, 2022
1 parent 4b5d720 commit 6860ae4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benchmarks/src/bin/tpch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6860ae4

Please sign in to comment.