jayzhan211 commented on code in PR #9991:
URL: https://github.com/apache/arrow-datafusion/pull/9991#discussion_r1557613644


##########
datafusion/physical-expr/src/aggregate/build_in.rs:
##########
@@ -417,7 +417,18 @@ pub fn create_aggregate_expr(
         (AggregateFunction::StringAgg, true) => {
             return not_impl_err!("STRING_AGG(DISTINCT) aggregations are not 
available");
         }
-    })
+    };
+
+    let agg_name = aggregate_expr.name();
+    if ignore_nulls && !aggregate_expr.support_ignore_nulls() {

Review Comment:
   I would prefer these checks at the beginning of the function, so we can 
avoid unnecessary compute for invalid cases



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