File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -521,8 +521,9 @@ pub trait HigherOrderUDF: Debug + DynEq + DynHash + Send + Sync + Any {
521521
522522 /// Coerce value arguments of a function call to types that the function can evaluate also taking into
523523 /// account the *output type of it's lambdas*. This differs from [HigherOrderUDF::coerce_value_types]
524- /// that only has access to the type of it's value arguments. So that this method is called, the
525- /// function must have it's [HigherOrderSignature::coerce_values_for_lambdas] set to true
524+ /// that only has access to the type of it's value arguments because it's called before the output type
525+ /// of lambdas are known. So that this method is called, the function must have it's
526+ /// [HigherOrderSignature::coerce_values_for_lambdas] set to true
526527 ///
527528 /// See the [type coercion module](crate::type_coercion)
528529 /// documentation for more details on type coercion
@@ -646,6 +647,9 @@ pub trait HigherOrderUDF: Debug + DynEq + DynHash + Send + Sync + Any {
646647 }
647648
648649 /// Coerce value arguments of a function call to types that the function can evaluate.
650+ /// Note that if you need to coerce values based on the output type of lambdas, you
651+ /// must use [HigherOrderUDF::coerce_values_for_lambdas], as this function is used before
652+ /// the output type of lambdas are known
649653 ///
650654 /// See the [type coercion module](crate::type_coercion)
651655 /// documentation for more details on type coercion
Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
412412 } )
413413 . collect :: < Result < Vec < _ > > > ( ) ?;
414414
415+ // coerce fields because coercion may alter the lambda parameters
415416 let mut fields =
416417 value_fields_with_higher_order_udf ( & current_fields, fm. as_ref ( ) ) ?
417418 . into_iter ( )
You can’t perform that action at this time.
0 commit comments