-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report current operation when coercion fails #13628
base: main
Are you sure you want to change the base?
Conversation
e20ee07
to
def1c98
Compare
@@ -218,7 +240,8 @@ fn try_coerce_types( | |||
|
|||
// none possible -> Error | |||
plan_err!( | |||
"Coercion from {:?} to the signature {:?} failed.", | |||
"{}: coercion from {:?} to the signature {:?} failed.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
"{}: coercion from {:?} to the signature {:?} failed.", | |
"Function {} failed to coerce from {:?} to the signature {:?}.", |
This makes for a more actionable error message.
def1c98
to
766c348
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1357,7 +1357,7 @@ mod test { | |||
|
|||
let err = Projection::try_new(vec![udaf], empty).err().unwrap(); | |||
assert!( | |||
err.strip_backtrace().starts_with("Error during planning: Error during planning: Coercion from [Utf8] to the signature Uniform(1, [Float64]) failed") | |||
err.strip_backtrace().starts_with("Error during planning: Error during planning: MY_AVG: coercion from [Utf8] to the signature Uniform(1, [Float64]) failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is much nicer 💯
This makes for a more actionable error message.