alamb commented on code in PR #3428:
URL: https://github.com/apache/arrow-datafusion/pull/3428#discussion_r967466735


##########
datafusion/expr/src/function.rs:
##########
@@ -39,15 +39,16 @@ use std::sync::Arc;
 pub type ScalarFunctionImplementation =
     Arc<dyn Fn(&[ColumnarValue]) -> Result<ColumnarValue> + Send + Sync>;
 
-/// A function's return type
+/// Factory that returns the functions's return type given the input argument 
types
 pub type ReturnTypeFunction =
     Arc<dyn Fn(&[DataType]) -> Result<Arc<DataType>> + Send + Sync>;
 
-/// the implementation of an aggregate function
+/// Factory that returns an accumulator for the given aggregate, given
+/// its return datatype.
 pub type AccumulatorFunctionImplementation =
-    Arc<dyn Fn() -> Result<Box<dyn Accumulator>> + Send + Sync>;
+    Arc<dyn Fn(&DataType) -> Result<Box<dyn Accumulator>> + Send + Sync>;

Review Comment:
   Here is the signature change



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