2010YOUY01 commented on code in PR #14271: URL: https://github.com/apache/datafusion/pull/14271#discussion_r1929505898
########## 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 -- 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