-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Minor: Fix error messages in array expressions #8781
Conversation
@@ -529,7 +529,7 @@ fn general_except<OffsetSize: OffsetSizeTrait>( | |||
|
|||
pub fn array_except(args: &[ArrayRef]) -> Result<ArrayRef> { | |||
if args.len() != 2 { | |||
return internal_err!("array_except needs two arguments"); | |||
return exec_err!("array_except needs two arguments"); |
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.
When to use internal_err, when to use exec_err?
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.
internal_err
: something that wasn't expected/anticipated by the implementation and that is most likely a bug (the error message even encourages users to open a bug report). I user should not be able to trigger this under normal circumstances. Note that I/O errors (or any error that happens due to external systems) do NOT fall under this category (there's an external error variant for that)
exec_err
: a processing error that happens during execution, e.g. the user passed malformed arguments to a SQL method, opened a CSV file that is broken, tried to divide an integer by zero. these errors shouldn't happen for a "good" query + "good" data, but since both the query and the data can easily be broken or misaligned, these are common occurrences in ETL systems / databases.
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 such a great explanation I figured I would encode it in the comments of DataFusionError
in its own PR: #8792
Thanks @Weijun-H and @crepererum |
…n.rs to exec_err! Signed-off-by: tangruilin <tang.ruilin@foxmail.com>
…o exec_err! (#9083) Signed-off-by: tangruilin <tang.ruilin@foxmail.com>
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?