jayzhan211 commented on code in PR #9874:
URL: https://github.com/apache/arrow-datafusion/pull/9874#discussion_r1547021900
##########
datafusion/expr/src/function.rs:
##########
@@ -37,10 +38,36 @@ pub type ScalarFunctionImplementation =
pub type ReturnTypeFunction =
Arc<dyn Fn(&[DataType]) -> Result<Arc<DataType>> + Send + Sync>;
-/// Factory that returns an accumulator for the given aggregate, given
-/// its return datatype.
+/// Arguments passed to create an accumulator
+pub struct AccumulatorArgs<'a> {
+ // default arguments
+ pub data_type: &'a DataType, // the return type of the function
+ pub schema: &'a Schema, // the schema of the input arguments
+ pub ignore_nulls: bool, // whether to ignore nulls
+
+ // ordering arguments
+ pub sort_exprs: &'a [Expr], // the expressions of `order by`
Review Comment:
Another approach is always set ordering with `with_ordering(sort_exprs: &'a
[Expr])`.
--
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]