Skip to content

Commit 6860ae4

Browse files
authored
Stop pretty printing in benchmark when there are no results (apache#3974)
1 parent 4b5d720 commit 6860ae4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

benchmarks/src/bin/tpch.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,11 @@ async fn execute_query(
326326
"=== Physical plan with metrics ===\n{}\n",
327327
DisplayableExecutionPlan::with_metrics(physical_plan.as_ref()).indent()
328328
);
329-
pretty::print_batches(&result)?;
329+
if !result.is_empty() {
330+
// do not call print_batches if there are no batches as the result is confusing
331+
// and makes it look like there is a batch with no columns
332+
pretty::print_batches(&result)?;
333+
}
330334
}
331335
Ok(result)
332336
}

0 commit comments

Comments
 (0)