Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <[email protected]>
  • Loading branch information
jayzhan211 committed May 10, 2024
1 parent 6f0a90b commit 5cc047b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions datafusion/optimizer/src/analyzer/type_coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down Expand Up @@ -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(())
Expand Down

0 comments on commit 5cc047b

Please sign in to comment.