Creates runtime configuration entries with the provided values This helper function defines the structure and metadata for all runtime configuration entries to avoid duplication between `RuntimeEnv::config_entries()` and `RuntimeEnvBuilder::entries()`.
(
memory_limit: Option<String>,
max_temp_directory_size: Option<String>,
temp_directory: Option<String>,
metadata_cache_limit: Option<String>,
list_files_cache_limit: Option<String
| 97 | /// entries to avoid duplication between `RuntimeEnv::config_entries()` and |
| 98 | /// `RuntimeEnvBuilder::entries()`. |
| 99 | fn create_runtime_config_entries( |
| 100 | memory_limit: Option<String>, |
| 101 | max_temp_directory_size: Option<String>, |
| 102 | temp_directory: Option<String>, |
| 103 | metadata_cache_limit: Option<String>, |
| 104 | list_files_cache_limit: Option<String>, |
| 105 | list_files_cache_ttl: Option<String>, |
| 106 | file_statistics_cache_limit: Option<String>, |
| 107 | ) -> Vec<ConfigEntry> { |
| 108 | vec![ |
| 109 | ConfigEntry { |
| 110 | key: "datafusion.runtime.memory_limit".to_string(), |
| 111 | value: memory_limit, |
| 112 | description: "Maximum memory limit for query execution. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes) or '0' for 0. Example: '2G' for 2 gigabytes.", |
| 113 | }, |
| 114 | ConfigEntry { |
| 115 | key: "datafusion.runtime.max_temp_directory_size".to_string(), |
| 116 | value: max_temp_directory_size, |
| 117 | description: "Maximum temporary file directory size. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes) or '0' for 0. Example: '2G' for 2 gigabytes.", |
| 118 | }, |
| 119 | ConfigEntry { |
| 120 | key: "datafusion.runtime.temp_directory".to_string(), |
| 121 | value: temp_directory, |
| 122 | description: "The path to the temporary file directory.", |
| 123 | }, |
| 124 | ConfigEntry { |
| 125 | key: "datafusion.runtime.metadata_cache_limit".to_string(), |
| 126 | value: metadata_cache_limit, |
| 127 | description: "Maximum memory to use for file metadata cache such as Parquet metadata. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes) or '0' for 0. Example: '2G' for 2 gigabytes.", |
| 128 | }, |
| 129 | ConfigEntry { |
| 130 | key: "datafusion.runtime.list_files_cache_limit".to_string(), |
| 131 | value: list_files_cache_limit, |
| 132 | description: "Maximum memory to use for list files cache. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes) or '0' for 0. Example: '2G' for 2 gigabytes.", |
| 133 | }, |
| 134 | ConfigEntry { |
| 135 | key: "datafusion.runtime.list_files_cache_ttl".to_string(), |
| 136 | value: list_files_cache_ttl, |
| 137 | description: "TTL (time-to-live) of the entries in the list file cache. Supports units m (minutes), and s (seconds). Example: '2m' for 2 minutes.", |
| 138 | }, |
| 139 | ConfigEntry { |
| 140 | key: "datafusion.runtime.file_statistics_cache_limit".to_string(), |
| 141 | value: file_statistics_cache_limit, |
| 142 | description: "Maximum memory to use for file statistics cache. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes) or '0' for 0. Example: '2G' for 2 gigabytes.", |
| 143 | }, |
| 144 | ] |
| 145 | } |
| 146 | |
| 147 | impl RuntimeEnv { |
| 148 | /// Registers a custom `ObjectStore` to be used with a specific url. |
no outgoing calls
no test coverage detected
searching dependent graphs…