Skip to content

Commit 030c2fb

Browse files
committed
fix doc comment
1 parent f3ece73 commit 030c2fb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎datafusion/expr/src/higher_order_function.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,12 +526,13 @@ pub trait HigherOrderUDF: Debug + DynEq + DynHash + Send + Sync + Any {
526526
/// * `fields`: The argument types of the value arguments of this function, or the output type of lambdas
527527
///
528528
/// # Return value
529-
/// A Vec with the same number of [ValueOrLambda::Value] in `fields`. DataFusion will `CAST` the
530-
/// function call arguments to these specific types.
529+
/// If `Some`, contains a Vec with the same number of [ValueOrLambda::Value] in `fields`.
530+
/// DataFusion will `CAST` the function call arguments to these specific types. If `None`, no
531+
/// coercion will be applied beyond the one defined by the function signature.
531532
///
532533
/// For example, a flexible array_reduce implementation (see [Self::lambda_parameters] docs), when working
533534
/// with the expression below, may want to coerce it's initial value argument, the *integer* `0`,
534-
/// to match the output it's merge function, which is a *float*:
535+
/// to match the output of it's merge function, which is a *float*:
535536
///
536537
/// `array_reduce([1.2, 2.1], 0, (acc, v) -> acc + v + 1.5, v -> v > 2.0)`
537538
fn coerce_values_for_lambdas(

0 commit comments

Comments
 (0)