We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a705d9 commit dff5d97Copy full SHA for dff5d97
datafusion/common/src/utils/mod.rs
@@ -1005,13 +1005,24 @@ pub fn take_function_args_with_diag<const N: usize, T>(
1005
v.len()
1006
);
1007
1008
- let diagnostic = Diagnostic::new_error(
+ let mut diagnostic = Diagnostic::new_error(
1009
format!(
1010
"Wrong number of arguments for {} function call",
1011
function_name
1012
),
1013
function_call_site,
1014
1015
+ diagnostic.add_note(
1016
+ format!(
1017
+ "Function {} takes exactly {} {}, but {} were provided",
1018
+ function_name,
1019
+ N,
1020
+ if N == 1 { "argument" } else { "arguments" },
1021
+ v.len(),
1022
+ ),
1023
+ None,
1024
+ );
1025
+
1026
base_error.with_diagnostic(diagnostic)
1027
})
1028
}
0 commit comments