diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs b/datafusion/optimizer/src/analyzer/type_coercion.rs index 2f9889a63db1..ff0ef4dfc683 100644 --- a/datafusion/optimizer/src/analyzer/type_coercion.rs +++ b/datafusion/optimizer/src/analyzer/type_coercion.rs @@ -865,12 +865,8 @@ mod test { signature: Signature::uniform(1, vec![DataType::Float32], Volatility::Stable), }) .call(vec![lit("Apple")]); - let plan_err = Projection::try_new(vec![udf], empty) + Projection::try_new(vec![udf], empty) .expect_err("Expected an error due to incorrect function input"); - - let expected_error = "Error during planning: No function matches the given name and argument types 'TestScalarUDF(Utf8)'. You might need to add explicit type casts."; - - assert!(plan_err.to_string().starts_with(expected_error)); Ok(()) } @@ -946,7 +942,7 @@ mod test { .err() .unwrap(); assert_eq!( - "type_coercion\ncaused by\nError during planning: Coercion from [Utf8] to the signature Uniform(1, [Float64]) failed.", + "type_coercion\ncaused by\nError during planning: [data_types_with_aggregate_udf] Coercion from [Utf8] to the signature Uniform(1, [Float64]) failed.", err.strip_backtrace() ); Ok(())