jayzhan211 commented on code in PR #11696:
URL: https://github.com/apache/datafusion/pull/11696#discussion_r1694856368
##########
datafusion/expr/src/udaf.rs:
##########
@@ -249,6 +249,14 @@ impl AggregateUDF {
pub fn simplify(&self) -> Option<AggregateFunctionSimplification> {
self.inner.simplify()
}
+
+ /// Returns true if the function is max, false if the function is min
+ /// None in all other cases, used in certain optimizations or
+ /// or aggregate
+ ///
+ pub fn get_minmax_desc(&self) -> Option<bool> {
Review Comment:
Here is the code that we need the boolean, maybe name it with
`is_descending: Option<bool>`?
```rust
let (field, desc) = aggr.get_minmax_desc()?;
if desc != order.options.descending {
return None;
}
```
--
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]