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

Function test_duplicate_parameter_name

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

Source from the content-addressed store, hash-verified

412
413 #[test]
414 fn test_duplicate_parameter_name() {
415 let param_names = vec!["a".to_string(), "b".to_string()];
416
417 // Call with: func(a => 1, a => 2) - ERROR
418 let args = vec![lit(1), lit(2)];
419 let arg_names = vec![
420 Some(ArgumentName {
421 value: "a".to_string(),
422 is_quoted: false,
423 }),
424 Some(ArgumentName {
425 value: "a".to_string(),
426 is_quoted: false,
427 }),
428 ];
429
430 let result = resolve_function_arguments(&param_names, args, arg_names);
431 assert!(result.is_err());
432 assert!(
433 result
434 .unwrap_err()
435 .to_string()
436 .contains("specified multiple times")
437 );
438 }
439
440 #[test]
441 fn test_missing_required_parameter() {

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…