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

Extension mechanism for SessionConfig #2939

Closed
crepererum opened this issue Jul 18, 2022 · 0 comments · Fixed by #2940
Closed

Extension mechanism for SessionConfig #2939

crepererum opened this issue Jul 18, 2022 · 0 comments · Fixed by #2940
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.
As a DataFusion user (concrete: the IOx team) I would like to be able to bind Any object to the SessionConfig so all traits that receive SessionState (e.g. TableProvider::scan) to receive application-specific objects, e.g. for tracing or caching.

Describe the solution you'd like
Attach some Arc<dyn Any> to SessionConfig.

Describe alternatives you've considered

  • Using the SessionState instead. I find that application-specific "stuff" might be better attached to the config, but I don't have a strong opinion on that.
  • Use the existing ConfigOptions. The problem is that these options only allow ScalarValues to be attached, which is not powerful enough to hold arbitrary objects.

Additional context
None.

@crepererum crepererum added the enhancement New feature or request label Jul 18, 2022
crepererum added a commit to crepererum/arrow-datafusion that referenced this issue Jul 18, 2022
This is helpful for application built on top of DataFusion that want to
pass certain query-scoped data structures around, e.g. for tracing or
caching.

This is loosely inspired by:
https://github.com/hyperium/http/blob/34a9d6bdab027948d6dea3b36d994f9cbaf96f75/src/extensions.rs#L6-L28

Closes apache#2939.
crepererum added a commit to crepererum/arrow-datafusion that referenced this issue Jul 19, 2022
This is helpful for application built on top of DataFusion that want to
pass certain query-scoped data structures around, e.g. for tracing or
caching.

This is loosely inspired by:
https://github.com/hyperium/http/blob/34a9d6bdab027948d6dea3b36d994f9cbaf96f75/src/extensions.rs#L6-L28

Closes apache#2939.
alamb pushed a commit that referenced this issue Jul 19, 2022
This is helpful for application built on top of DataFusion that want to
pass certain query-scoped data structures around, e.g. for tracing or
caching.

This is loosely inspired by:
https://github.com/hyperium/http/blob/34a9d6bdab027948d6dea3b36d994f9cbaf96f75/src/extensions.rs#L6-L28

Closes #2939.
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