felipecrv commented on issue #43768:
URL: https://github.com/apache/arrow/issues/43768#issuecomment-2299997262

   It's weird because `COUNT` is weird in SQL.
   
   ```sql
    SELECT a, COUNT(5) FROM test1 GROUP BY a;
   ```
   
   will return the value of column `a` for each group and `COUNT(<any literal 
here>)` will count the size of the group.
   
   But
   
   ```sql
   SELECT a, any(TRUE) FROM test1 GROUP BY a;
   ```
   
   will always produce `TRUE` and never bother looking at the values in the 
grouped values from the table.
   
   I think it would be worth having a comment in the `CountImpl` branch that 
handles scalars by ignoring the scalar value.


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