Omega359 commented on code in PR #18408:
URL: https://github.com/apache/datafusion/pull/18408#discussion_r2487246265


##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1134,6 +1170,40 @@ impl SessionContext {
         Ok(())
     }
 
+    fn reset_runtime_variable(&self, variable: &str) -> Result<()> {
+        let key = variable.strip_prefix("datafusion.runtime.").unwrap();
+
+        let mut state = self.state.write();
+
+        let mut builder = 
RuntimeEnvBuilder::from_runtime_env(state.runtime_env());
+        match key {
+            "memory_limit" => {
+                builder.memory_pool = None;
+            }
+            "max_temp_directory_size" => {
+                // default is 100 GB
+                const DEFAULT_MAX_TEMP_DIRECTORY_SIZE: u64 = 100 * 1024 * 1024 
* 1024;

Review Comment:
   I see this const in disk_manager.rs, could we not just use that? Might need 
to change to pub(crate) though...



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

Reply via email to