MCPcopy Create free account
hub / github.com/apache/datafusion / generate_signature_error_msg

Function generate_signature_error_msg

datafusion/expr/src/utils.rs:975–994  ·  view source on GitHub ↗
(
    func_name: &str,
    func_signature: Signature,
    input_expr_types: &[DataType],
)

Source from the content-addressed store, hash-verified

973#[expect(clippy::needless_pass_by_value)]
974#[deprecated(since = "53.0.0", note = "Internal function")]
975pub 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///

Callers 1

Calls 4

joinMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…