mustafasrepo commented on code in PR #10651: URL: https://github.com/apache/datafusion/pull/10651#discussion_r1621995214
########## datafusion/physical-expr-common/src/aggregate/mod.rs: ########## @@ -49,7 +51,10 @@ pub fn create_aggregate_expr( ignore_nulls: bool, is_distinct: bool, ) -> Result<Arc<dyn AggregateExpr>> { - debug_assert_eq!(sort_exprs.len(), ordering_req.len()); + // sort_exprs is used for udaf accumulator only, so it is not neccessary + // if the aggregate function does not care about accumulator + // debug_assert_eq!(sort_exprs.len(), ordering_req.len()); Review Comment: I think, this invariant is pretty important. It helps to catch some bugs otherwise quite hard to locate. Hence, I think we should keep this check in place. -- 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