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

Do NOT convert intermediate/source errors to strings. #4434

Closed
crepererum opened this issue Nov 30, 2022 · 1 comment · Fixed by #4436
Closed

Do NOT convert intermediate/source errors to strings. #4434

crepererum opened this issue Nov 30, 2022 · 1 comment · Fixed by #4436
Labels
enhancement New feature or request

Comments

@crepererum
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Now that DF emits ResourceExhausted errors for out-of-memory situations, it would be nice if the API user could somehow detect this situation (e.g. to convert this to a suitable HTTP status code).

Describe the solution you'd like
There are a few places where we convert errors to strings, mostly to wrap them into DataFusionError::Execution(...). However DF (and Arrow) have ways to wrap arbitrary error types (external error). To send errors to multiple receivers, they can easily be wrapped into Arcs (Arc forwards std::error::Error).

Describe alternatives you've considered
Perform string "parsing" on the top-level err.to_string(). This is pretty bad code smell.

Additional context
See #3940 for an application.

@crepererum crepererum added the enhancement New feature or request label Nov 30, 2022
@crepererum
Copy link
Contributor Author

I'm working on this.

crepererum added a commit to crepererum/arrow-datafusion that referenced this issue Nov 30, 2022
Wrap them into proper containers instead.

Fixes apache#4434.
crepererum added a commit to crepererum/arrow-datafusion that referenced this issue Nov 30, 2022
Wrap them into proper containers instead.

Fixes apache#4434.
crepererum added a commit to crepererum/arrow-datafusion that referenced this issue Nov 30, 2022
Wrap them into proper containers instead.

Fixes apache#4434.
alamb pushed a commit that referenced this issue Dec 1, 2022
Wrap them into proper containers instead.

Fixes #4434.
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
Development

Successfully merging a pull request may close this issue.

1 participant