jonahgao commented on code in PR #14824:
URL: https://github.com/apache/datafusion/pull/14824#discussion_r1967740571


##########
datafusion/functions-aggregate/src/count.rs:
##########
@@ -148,6 +155,15 @@ impl AggregateUDFImpl for Count {
         "count"
     }
 
+    // In AggregateFunctionPlanner, wildcard is converted to count(1)
+    //
+    // count() -> count(1)

Review Comment:
   We still can't run `select count(), count(*)`.
   ```sh
   > select count(), count(*);
   Error during planning: Projections require unique expression names but the 
expression "count(*)" at position 0 and "count(*)" at position 1 have the same 
name. Consider aliasing ("AS") one of them
   ```
   I suspect that using aliases to restore the original names is a simpler fix. 
I tried doing this on 
https://github.com/jonahgao/datafusion/commit/08206fd5179da6efbc12ec2f863d4b3bf5baa6ef.



-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to