diff --git a/datafusion/core/src/execution/context/mod.rs b/datafusion/core/src/execution/context/mod.rs index abd704f5335e6..ea635574ea83e 100644 --- a/datafusion/core/src/execution/context/mod.rs +++ b/datafusion/core/src/execution/context/mod.rs @@ -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(&self, ext: Arc) + 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()