qrilka commented on issue #104:
URL: 
https://github.com/apache/arrow-datafusion/issues/104#issuecomment-1750711858

   @alamb after some debugging I have found that we could just change 
[COUNT_STAR_NAME](https://github.com/apache/arrow-datafusion/blob/85046001da91d535f7ea417911cd51944f9820f4/datafusion/core/src/physical_optimizer/aggregate_statistics.rs#L41)
 to "COUNT(*)" and everything works fine and tests need to be fixed.
   BTW the problem comes specifically from `aggregate_statistics` and if it 
doesn't get applied we get a correct column name. E.g.:
   ```
   ❯ select count(*) from (select 1 union select 2);
   +----------+
   | COUNT(*) |
   +----------+
   | 2        |
   +----------+
   1 row in set. Query took 0.022 seconds.
   ```
   
   Will create a PR with this fix


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