-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: Extend backtrace coverage for Execution and Internal errors
#17921
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
Conversation
|
I'm actually thinking to create custom lint or script which should check errors implementation for PRs to automate checks |
|
Just FYI: used Claude and Roo Code to mass change to test it out, |
dqkqd
left a comment
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 looks great to me, thanks you very much. @comphead
Execution and Internal errors
alamb
left a comment
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.
datafusion/execution/src/task.rs
Outdated
| "There is no UDWF named \"{name}\" in the TaskContext" | ||
| )) | ||
| internal_datafusion_err!( | ||
| "There is no UDWF named \"{}\" in the TaskContext", |
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.
why not keep the inline format?
| "There is no UDWF named \"{}\" in the TaskContext", | |
| "There is no UDWF named \"{name}\" in the TaskContext", |
?
| "Unable to retrieve field in WindowUDF via FFI".to_string(), | ||
| )), | ||
| true => exec_err!( | ||
| "Unable to retrieve field in WindowUDF via FFI - schema has no fields" |
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.
👍
| .map_err(|e| { | ||
| DataFusionError::Internal(format!("Failed to decode from base64: {e}")) | ||
| }) | ||
| .map_err(|e| internal_datafusion_err!("Failed to decode from base64: {}", e)) |
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.
likewise in this this file, why not put the exception inline?
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 how Claude works 🤔 Thanks for pointing this out
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.
Probably trained on too much old rust code 😆
Which issue does this PR close?
Rationale for this change
Replace raw
DataFusionErrorwith backtrace supported onesThe PR just replaces
DataFusionError::ExecutionandDataFusionError::Internalto use error macros insteadWhat changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?