Skip to content

Commit ba11072

Browse files
committed
fix docs to reflect new api
1 parent 030c2fb commit ba11072

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎datafusion/expr/src/higher_order_function.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,12 @@ pub trait HigherOrderUDF: Debug + DynEq + DynHash + Send + Sync + Any {
489489
///
490490
/// assert_eq!(
491491
/// coerce_to,
492-
/// vec![
492+
/// Some(vec![
493493
/// // return the same type for the array being reduced
494494
/// DataType::new_list(DataType::Float32, true),
495495
/// // coerce the initial value to the output of the merge lambda
496496
/// DataType::Float32,
497-
/// ]
497+
/// ])
498498
/// );
499499
///
500500
/// ```

‎datafusion/expr/src/type_coercion/functions.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ pub fn fields_with_udf<F: UDFCoercionExt>(
158158
/// argument must be coerced to match `signature`.
159159
/// For lambda arguments, returns a clone of the associated data
160160
///
161-
/// Note this does not invokes [HigherOrderUDF::coerce_values_for_lambdas]
162-
/// if requested by the function signature. If that's required, use
163-
/// [value_fields_with_higher_order_udf_and_lambdas] instead
161+
/// Note this does not invokes [HigherOrderUDF::coerce_values_for_lambdas].
162+
/// If that's required, use [value_fields_with_higher_order_udf_and_lambdas]
163+
/// instead
164164
///
165165
/// For more details on coercion in general, please see the
166166
/// [`type_coercion`](crate::type_coercion) module.
@@ -235,8 +235,8 @@ pub fn value_fields_with_higher_order_udf<L: Clone>(
235235

236236
/// Performs type coercion for higher order function arguments,
237237
/// including those defined by [HigherOrderUDF::coerce_values_for_lambdas],
238-
/// if defined by the signature. Note that compared to
239-
/// [value_fields_with_higher_order_udf], this function requires
238+
/// if it returns `Some(...)` instead of the default `None`. Note that
239+
/// compared to [value_fields_with_higher_order_udf], this function requires
240240
/// the [ValueOrLambda::Lambda] variant to contain the output field of the lambda.
241241
///
242242
/// For value arguments, returns the field to which each

0 commit comments

Comments
 (0)