Skip to content

Commit 50f2d88

Browse files
committed
Update
1 parent 532cc28 commit 50f2d88

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

datafusion/expr/src/udaf.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,13 @@ pub trait AggregateUDFImpl: Debug + DynEq + DynHash + Send + Sync {
651651
AggregateOrderSensitivity::HardRequirement
652652
}
653653

654-
/// Return a closure for simplifying a user defined aggregate.
654+
/// Return a closure for simplifying a user-defined aggregate.
655655
///
656-
/// Use this to apply function specific simplification rules during
657-
/// optimization (e.g. `percentile_cont()` --> `Min`). The default
658-
/// implementation does nothing.
656+
/// Use this to apply function-specific simplification rules during
657+
/// optimization. The default implementation does nothing.
658+
///
659+
/// For example, `percentile_cont()` can be replaced `MIN` or `MAX` when the
660+
/// target percentile is `0.0` or `1.0`, respectively).
659661
///
660662
/// Note that DataFusion handles simplifying arguments and "constant
661663
/// folding" (replacing a function call with constant arguments such as
@@ -667,7 +669,7 @@ pub trait AggregateUDFImpl: Debug + DynEq + DynHash + Send + Sync {
667669
/// [None] if simplify is not defined
668670
///
669671
/// Or, a closure with two arguments:
670-
/// * 'aggregate_function': [AggregateFunction], which includes already simplified
672+
/// * 'aggregate_function': [AggregateFunction], which already includes simplified
671673
/// arguments
672674
/// * 'info': [crate::simplify::SimplifyContext]
673675
///

0 commit comments

Comments
 (0)