Omega359 commented on code in PR #18408:
URL: https://github.com/apache/datafusion/pull/18408#discussion_r2487247780
##########
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;
+ builder =
+
builder.with_max_temp_directory_size(DEFAULT_MAX_TEMP_DIRECTORY_SIZE);
+ }
+ "temp_directory" => {
+ builder.disk_manager_builder =
Some(DiskManagerBuilder::default());
+ }
+ "metadata_cache_limit" => {
+ // default is 50 MB
+ const DEFAULT_METADATA_CACHE_LIMIT: usize = 50 * 1024 * 1024;
+ builder =
builder.with_metadata_cache_limit(DEFAULT_METADATA_CACHE_LIMIT);
Review Comment:
Same here in cache_manager.rs
--
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]