(
func_name: &str,
func_signature: Signature,
input_expr_types: &[DataType],
)
| 973 | #[expect(clippy::needless_pass_by_value)] |
| 974 | #[deprecated(since = "53.0.0", note = "Internal function")] |
| 975 | pub fn generate_signature_error_msg( |
| 976 | func_name: &str, |
| 977 | func_signature: Signature, |
| 978 | input_expr_types: &[DataType], |
| 979 | ) -> String { |
| 980 | let candidate_signatures = func_signature |
| 981 | .type_signature |
| 982 | .to_string_repr_with_names(func_signature.parameter_names.as_deref()) |
| 983 | .iter() |
| 984 | .map(|args_str| format!("\t{func_name}({args_str})")) |
| 985 | .collect::<Vec<String>>() |
| 986 | .join("\n"); |
| 987 | |
| 988 | format!( |
| 989 | "No function matches the given name and argument types '{}({})'. You might need to add explicit type casts.\n\tCandidate functions:\n{}", |
| 990 | func_name, |
| 991 | TypeSignature::join_types(input_expr_types, ", "), |
| 992 | candidate_signatures |
| 993 | ) |
| 994 | } |
| 995 | |
| 996 | /// Creates a detailed error message for a function with wrong signature. |
| 997 | /// |
no test coverage detected
searching dependent graphs…