alamb commented on code in PR #8895:
URL: https://github.com/apache/arrow-datafusion/pull/8895#discussion_r1457315634
##########
datafusion-cli/src/print_format.rs:
##########
@@ -161,23 +161,29 @@ impl PrintFormat {
maxrows: MaxRows,
with_header: bool,
) -> Result<()> {
- if batches.is_empty() || batches[0].num_rows() == 0 {
+ // filter out any empty batches
+ let batches: Vec<_> = batches
+ .iter()
+ .filter(|b| b.num_rows() > 0)
+ .cloned()
+ .collect();
+ if batches.is_empty() {
Review Comment:
Filed https://github.com/apache/arrow-datafusion/issues/8904 to track (and I
confirmed the "print nothing if no data" behavior was present in versions 33
and 25).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]