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

Function test_unknown_parameter_name

datafusion/expr/src/arguments.rs:387–411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

385
386 #[test]
387 fn test_unknown_parameter_name() {
388 let param_names = vec!["a".to_string(), "b".to_string()];
389
390 // Call with: func(x => 1, b => "hello") - ERROR
391 let args = vec![lit(1), lit("hello")];
392 let arg_names = vec![
393 Some(ArgumentName {
394 value: "x".to_string(),
395 is_quoted: false,
396 }),
397 Some(ArgumentName {
398 value: "b".to_string(),
399 is_quoted: false,
400 }),
401 ];
402
403 let result = resolve_function_arguments(&param_names, args, arg_names);
404 assert!(result.is_err());
405 assert!(
406 result
407 .unwrap_err()
408 .to_string()
409 .contains("Unknown parameter")
410 );
411 }
412
413 #[test]
414 fn test_duplicate_parameter_name() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…