-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Extract registering default features from SessionState
and into its own function
#11320
Comments
Should we cut it even more granularly to several of |
I was actually looking at this last week interestingly enough. My thought was to have a parent In doing it that way we could allow for
|
I think this is a good idea. If we want htat level of customizablility, perhaps we could make a builder style interface. Something like 🤔 let builder = SessionStateBuilder::new()
.with_default_functions(false);
let state: SessionState = builder.build()?; |
Would we want to then deprecate the SessionState::new_with_config_rt and SessionState::new_with_config_rt_and_catalog_list as well (basically all the SessionState::new_* functions) leaving the builder as the preferred method to create a SessionState ? |
take |
Is your feature request related to a problem or challenge?
Using
SessionContext
provides a batteries included experience, as it configures and installs many functions, rewrites, data providers, etc.However, for those people who want to more carefully control how DataFusion works (as we do in InfluxDB and I think delta.rs does with
DeltaTable
s) it is somewhat akward to do so. It also makes it harder toOne of the major challenges is that
SessionState's
constructor basically installs the "pre-provided" functionality (like data sources, rewrites, udfs, etc)datafusion/datafusion/core/src/execution/session_state.rs
Lines 190 to 295 in 78055fe
This pre-installation also makes it hard to split SessionState / catalog information out of the core as discussed in #11182
Describe the solution you'd like
I would like to be able to construct SessionState with the minimal built in features, and have a separate function / configuration system
That way it would still be easy to use DataFusion with a minimal
SessionState
but also easily register all the built in extensions 🤔Describe alternatives you've considered
Idea 1: function in
SessionContext
SessionContext
likeSessionContext::register_built_ins
that would register things like listing table, information schema, etc.Then
SessionContext::new()
etc could call this function but there should be a way to create aSessionState
without calling it (for minimal use)Additional context
This came up most recently with @rtyler in #11180 (comment). I am not sure if it is quite the same thing, but I think the symptoms are at least similar
@jayzhan211 @Omega359 and @ahirner and I discussed this in the context of
#11182 -- #11182 (comment)
The text was updated successfully, but these errors were encountered: