mustafasrepo commented on code in PR #10651: URL: https://github.com/apache/datafusion/pull/10651#discussion_r1622000662
########## datafusion/physical-expr-common/src/aggregate/mod.rs: ########## @@ -333,11 +351,24 @@ impl AggregateExpr for AggregateFunctionExpr { } fn create_groups_accumulator(&self) -> Result<Box<dyn GroupsAccumulator>> { - self.fun.create_groups_accumulator() + let args = AccumulatorArgs { + data_type: &self.data_type, + schema: &self.schema, + ignore_nulls: self.ignore_nulls, + sort_exprs: &self.sort_exprs, + is_distinct: self.is_distinct, + input_type: &self.input_type, + args_num: self.args.len(), + name: &self.name, + }; + self.fun.create_groups_accumulator(args) } fn order_bys(&self) -> Option<&[PhysicalSortExpr]> { - (!self.ordering_req.is_empty()).then_some(&self.ordering_req) + if self.fun.has_ordering_requirements() && !self.ordering_req.is_empty() { Review Comment: Even if `has_ordering_requirements` is not introduced in this PR. I think, with the `order_sensitivity` API. This API is redundant. I think, it is better to remove this API (in this Pr or in subsequent ones). -- 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