From eb0ebe04fc92baec527ffd945b8801f72ffecf48 Mon Sep 17 00:00:00 2001 From: Edmondo Porcu Date: Tue, 30 Jul 2024 00:33:06 +0000 Subject: [PATCH] Implementing feedback from PR --- datafusion/expr/src/udaf.rs | 6 +++--- datafusion/physical-expr-common/src/aggregate/mod.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/datafusion/expr/src/udaf.rs b/datafusion/expr/src/udaf.rs index 61abb60e13cf..af964b615445 100644 --- a/datafusion/expr/src/udaf.rs +++ b/datafusion/expr/src/udaf.rs @@ -254,8 +254,8 @@ impl AggregateUDF { /// None in all other cases, used in certain optimizations or /// or aggregate /// - pub fn get_minmax_desc(&self) -> Option { - self.inner.get_minmax_desc() + pub fn is_descending(&self) -> Option { + self.inner.is_descending() } } @@ -551,7 +551,7 @@ pub trait AggregateUDFImpl: Debug + Send + Sync { /// /// /// Note: this is used to use special aggregate implementations in certain conditions - fn get_minmax_desc(&self) -> Option { + fn is_descending(&self) -> Option { None } } diff --git a/datafusion/physical-expr-common/src/aggregate/mod.rs b/datafusion/physical-expr-common/src/aggregate/mod.rs index de4355dab642..aa7273648c63 100644 --- a/datafusion/physical-expr-common/src/aggregate/mod.rs +++ b/datafusion/physical-expr-common/src/aggregate/mod.rs @@ -733,7 +733,7 @@ impl AggregateExpr for AggregateFunctionExpr { fn get_minmax_desc(&self) -> Option<(Field, bool)> { self.fun - .get_minmax_desc() + .is_descending() .and_then(|flag| self.field().ok().map(|f| (f, flag))) } }