alamb commented on code in PR #8895:
URL: https://github.com/apache/arrow-datafusion/pull/8895#discussion_r1455723399
##########
datafusion-cli/src/print_format.rs:
##########
@@ -161,7 +161,7 @@ impl PrintFormat {
maxrows: MaxRows,
with_header: bool,
) -> Result<()> {
- if batches.is_empty() || batches[0].num_rows() == 0 {
+ if batches.is_empty() {
Review Comment:
> However, I think the intention is wrong. We should totally print the
header even if there's no data. This entire "don't print anything if the result
is empty" is super confusing, at least in my opinion.
This is a good call -- I will update and add a test
I believe the logic is to support generating output incrementally
("Streaming") rather than waiting for the entire output to be generated as
`Vec<RecordBatch>`.
However, that logic is sort of split between this module and
`print_format.rs` which I agree is confusing
cc @berkaysynnada
--
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]