berkaysynnada commented on code in PR #14271:
URL: https://github.com/apache/datafusion/pull/14271#discussion_r1932037809
##########
datafusion/expr/src/udaf.rs:
##########
@@ -635,6 +655,14 @@ pub trait AggregateUDFImpl: Debug + Send + Sync {
fn documentation(&self) -> Option<&Documentation> {
None
}
+
+ /// Indicates whether the aggregation function is monotonic as a set
function. A set
+ /// function is monotonically increasing if its value increases as its
argument grows
+ /// (as a set). Formally, `f` is a monotonically increasing set function
if `f(S) >= f(T)`
+ /// whenever `S` is a superset of `T`.
+ fn monotonicity(&self, _data_type: &DataType) -> AggregateExprMonotonicity
{
Review Comment:
> I recommend adding a note at the beginning of the comment: This is used
for a specific (is it BoundedWindowAggExec? )optimization and can be skipped by
using the default implementation. This interface seems quite difficult to
understand for a general user who only wants to add a simple UDAF
We've tried to provide a good documentation, and the API's itself comes up
with a default implementation. If the general users are not interested at these
properties, we are not forcing them to be. Do you have further suggestions
either for code or documentation level?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]