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


##########
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:
   I think we can have an empty vec to describe no `ORDER BY` is given.



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