apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.48k stars 1.01k forks source link

Improve DataFusion error handling #7360

Open comphead opened 10 months ago

comphead commented 10 months ago

Is your feature request related to a problem or challenge?

I'm trying to collect known issues related to error handling in datafusion.

So far I can see different categories which can be improved

  1. DataFusion heavily relies on Rust Result<T, E> and sometimes its hard to identify context where the actual error is happening, the situation becomes even worse for downstream projects.
  2. Overuse panics
  3. Overuse internal error type in situations where more specific error kind can be used
  4. General

Describe the solution you'd like

We can try to address some of the issues with implementing a generic error macros that will be used for handling DF errors. Having done that allows to process errors in standard unified way, experiment with stacktraces and other details needed to be exposed for the end user.

Describe alternatives you've considered

No response

Additional context

No response

alamb commented 2 months ago

I think we have made significant progress on this issue. I wonder if we still have more planned work?