Skip to content

Commit

Permalink
TEMP - add support for updating the config in a session
Browse files Browse the repository at this point in the history
  • Loading branch information
aditanase committed Jun 5, 2024
1 parent c7f05e3 commit 8ec44e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,17 @@ impl SessionContext {
self.state.read().runtime_env.clone()
}

// TODO: @ExecutorCredentials - don't use AnyMap extensions
// Look for other APIs or other ways to update the session config with the credentials
// Or create another cache dedicated to this
pub fn set_config_extension<T>(&self, ext: Arc<T>)
where
T: Send + Sync + 'static,
{
let mut state = self.state.write();
state.config_mut().set_extension(ext);
}

/// Returns an id that uniquely identifies this `SessionContext`.
pub fn session_id(&self) -> String {
self.session_id.clone()
Expand Down

0 comments on commit 8ec44e0

Please sign in to comment.