Jefffrey commented on code in PR #8895:
URL: https://github.com/apache/arrow-datafusion/pull/8895#discussion_r1457211730


##########
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:
   Ah ok, I didn't realize the "print nothing if no data" was a previous issue 
before that streaming PR
   
   Then yeah I agree can fix that separately if it wasn't technically a 
regression



-- 
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]

Reply via email to