Verify that function is invoked with correct number and type of arguments as defined in `TypeSignature`.
(
function: &F,
input_fields: &[FieldRef],
)
| 718 | /// Verify that function is invoked with correct number and type of arguments as |
| 719 | /// defined in `TypeSignature`. |
| 720 | fn verify_function_arguments<F: UDFCoercionExt>( |
| 721 | function: &F, |
| 722 | input_fields: &[FieldRef], |
| 723 | ) -> Result<Vec<FieldRef>> { |
| 724 | fields_with_udf(input_fields, function).map_err(|err| { |
| 725 | let data_types = input_fields |
| 726 | .iter() |
| 727 | .map(|f| f.data_type()) |
| 728 | .cloned() |
| 729 | .collect::<Vec<_>>(); |
| 730 | plan_datafusion_err!( |
| 731 | "{}. {}", |
| 732 | match err { |
| 733 | DataFusionError::Plan(msg) => msg, |
| 734 | err => err.to_string(), |
| 735 | }, |
| 736 | utils::generate_signature_error_message( |
| 737 | function.name(), |
| 738 | function.signature(), |
| 739 | &data_types |
| 740 | ) |
| 741 | ) |
| 742 | }) |
| 743 | } |
| 744 | |
| 745 | /// Returns the innermost [Expr] that is provably null if `expr` is null. |
| 746 | fn unwrap_certainly_null_expr(expr: &Expr) -> &Expr { |