Skip to content
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

Implement std::error::Error for DataFusionError #4991

Closed
alamb opened this issue Jan 19, 2023 · 3 comments · Fixed by #4992
Closed

Implement std::error::Error for DataFusionError #4991

alamb opened this issue Jan 19, 2023 · 3 comments · Fixed by #4992
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Jan 19, 2023

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In IOx (and in DataFusion) we often want to know what the root cause of an error is (e.g was it a bug or was it a resources exhausted). ArrowError can wrap other errors with Arrow::External (and DataFusion has something similar) but there is no easy way to get at the source of the error to walk the chain without knowing all the possible types that may be present

See https://github.com/apache/arrow-datafusion/blob/dde23efed94704044822bcefe49c0af7f9260088/datafusion/common/src/error.rs#L361-L439 for what we need to do now in datafusion 🤮

Describe the solution you'd like

  1. Add DataFusionError::source()
  2. Update find_root() to use that

Describe alternatives you've considered
N/A

Additional context
PR in arrow-rs: apache/arrow-rs#3567

@avantgardnerio
Copy link
Contributor

@alamb does this also resolve #4981 ?

@alamb
Copy link
Contributor Author

alamb commented Jan 19, 2023

@alamb does this also resolve #4981 ?

@avantgardnerio I think it may

@DDtKey what do you think?

@avantgardnerio
Copy link
Contributor

@alamb does this also resolve #4981 ?

@avantgardnerio I think it may

@DDtKey what do you think?

That was my 3-second appraisal. I've since reviewed @DDtKey 's PR and think it is in addition to, not instead of your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants