You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2024/01/01 04:27:09 UTC

[I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Jefffrey opened a new issue, #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702

   ### Describe the bug
   
   datafusion-cli isn't showing results for queries involving selecting count when group by.
   
   ### To Reproduce
   
   Given input file:
   
   ```csv
   col1,col2
   A,
   B,b
   C,c
   ```
   
   Querying this file in datafusion-cli:
   
   ```
   DataFusion CLI v34.0.0
   ❯ CREATE EXTERNAL TABLE kumachan STORED AS CSV WITH HEADER ROW LOCATION '/home/jeffrey/Downloads/kumachan.csv';
   0 rows in set. Query took 0.029 seconds.
   
   ❯ select * from kumachan;
   +------+------+
   | col1 | col2 |
   +------+------+
   | A    |      |
   | B    | b    |
   | C    | c    |
   +------+------+
   3 rows in set. Query took 0.005 seconds.
   
   ❯ select count(*) from kumachan group by col1;
   3 rows in set. Query took 0.010 seconds.
   
   ❯
   ```
   
   ### Expected behavior
   
   Should get results like:
   
   ```
   +----------+
   | COUNT(*) |
   +----------+
   | 1        |
   | 1        |
   | 1        |
   +----------+
   ```
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1895638471

   This appears to have been introduced in https://github.com/apache/arrow-datafusion/pull/8651


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1894640084

   I think this is a regression and we should try and fix it before datafusion 35 release https://github.com/apache/arrow-datafusion/issues/8863 -- cc @andygrove 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #8702: datafusion-cli: results of group by aggregation query not showing
URL: https://github.com/apache/arrow-datafusion/issues/8702


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1895630131

   Thanks @Jefffrey  -- I will make a patch


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1895438817

   Problem is here:
   
   https://github.com/apache/arrow-datafusion/blob/ffaa67904ed0ca454267ccc5832582bcb669a5c0/datafusion-cli/src/print_format.rs#L164
   
   Specifically the `batches[0].num_rows() == 0`
   
   It seems my query will have some empty RecordBatches initially, which causes this check to completely ignore printing the rest of the potentially data-filled RecordBatches


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1873305907

   Maybe some other fallout from https://github.com/apache/arrow-datafusion/pull/8651 -- I had some work in progress to try and consolidate / clean up the output code more in https://github.com/alamb/arrow-datafusion/tree/alamb/cli-cleanup but I have not finished it


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1895682192

   PR ready for review: https://github.com/apache/arrow-datafusion/pull/8895


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] datafusion-cli: results of group by aggregation query not showing [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8702:
URL: https://github.com/apache/arrow-datafusion/issues/8702#issuecomment-1894640620

   I can try to help debug this tomorrow if no one else beats me to it


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org