waitingkuo commented on code in PR #3455:
URL: https://github.com/apache/arrow-datafusion/pull/3455#discussion_r968907557


##########
datafusion/core/src/execution/context.rs:
##########
@@ -1166,14 +1167,14 @@ impl SessionConfig {
     /// Create an execution config with config options read from the 
environment
     pub fn from_env() -> Self {
         Self {
-            config_options: ConfigOptions::from_env(),
+            config_options: Arc::new(RwLock::new(ConfigOptions::from_env())),
             ..Default::default()
         }
     }
 
     /// Set a configuration option
-    pub fn set(mut self, key: &str, value: ScalarValue) -> Self {
-        self.config_options.set(key, value);
+    pub fn set(self, key: &str, value: ScalarValue) -> Self {
+        self.config_options.write().set(key, value);
         self

Review Comment:
   `config_options.write()` to get the write lock and set the value



-- 
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]

Reply via email to