Skip to content

Commit

Permalink
[fix #8904] Improved output of datafuson-cli with empty results
Browse files Browse the repository at this point in the history
Signed-off-by: tangruilin <[email protected]>
  • Loading branch information
Tangruilin committed Jan 22, 2024
1 parent d81c961 commit fda1b81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion datafusion/physical-plan/src/coalesce_batches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ impl CoalesceBatchesStream {
{
return Poll::Ready(Some(Ok(batch)));
} else if batch.num_rows() == 0 {
// discard empty batches
// for empty batches, it also should be print
return Poll::Ready(Some(Ok(batch)));
} else {
// add to the buffered batches
self.buffered_rows += batch.num_rows();
Expand Down
4 changes: 0 additions & 4 deletions datafusion/physical-plan/src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@ impl Stream for FilterExecStream {
Some(Ok(batch)) => {
let timer = self.baseline_metrics.elapsed_compute().timer();
let filtered_batch = batch_filter(&batch, &self.predicate)?;
// skip entirely filtered batches
if filtered_batch.num_rows() == 0 {
continue;
}
timer.done();
poll = Poll::Ready(Some(Ok(filtered_batch)));
break;
Expand Down

0 comments on commit fda1b81

Please sign in to comment.