You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/01 15:40:34 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4031: Reserve the literal expression of `Count` function

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

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