goldmedal commented on issue #12394: URL: https://github.com/apache/datafusion/issues/12394#issuecomment-2350992072
@alamb I found some problems with this issue. Because the dynamic file querying implementation relies on `SessionStore` which should consume a weak RwLock of `SessionState`, we need to register the weak reference after building the session state: https://github.com/apache/datafusion/blob/6590ea31e88774ec45c14ff72f160f85be0cbabe/datafusion/core/src/execution/context/mod.rs#L392-L403 However, the RwLock is commonly built when creating the SessionContext. https://github.com/apache/datafusion/blob/6590ea31e88774ec45c14ff72f160f85be0cbabe/datafusion/core/src/execution/context/mod.rs#L352-L357 I think your proposed usage doesn't work 🤔 because `build()` should return the `SessionState` instance. Maybe we can provide another way to build the session state like ```rust let session_state_ref: Arc<RwLock<SessionState>> = SessionStateBuilder::new() .with_default_features() .with_config(cfg) .enable_url_table_and_build() let ctx = SessionContext::from(session_state_ref); ``` WDYT? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
