alamb commented on code in PR #4031:
URL: https://github.com/apache/arrow-datafusion/pull/4031#discussion_r1010580334


##########
datafusion/sql/src/planner.rs:
##########
@@ -2344,25 +2344,21 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
     fn aggregate_fn_to_expr(
         &self,
         fun: AggregateFunction,
-        function: sqlparser::ast::Function,
+        args: Vec<FunctionArg>,
         schema: &DFSchema,
     ) -> Result<(AggregateFunction, Vec<Expr>)> {
         let args = match fun {
             // Special case rewrite COUNT(*) to COUNT(constant)
-            AggregateFunction::Count => function
-                .args
+            AggregateFunction::Count => args
                 .into_iter()
                 .map(|a| match a {
-                    FunctionArg::Unnamed(FunctionArgExpr::Expr(SQLExpr::Value(

Review Comment:
   ๐Ÿงน 
   
   Not sure why that was in there
   
   Nice work @HaoYang670  fixing bugs by deleting code ๐Ÿ… 



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