Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime resources

Functions§

apply_max_temp_directory_mb
Applies mb (megabytes) as the disk manager’s max temp directory size, in bytes. Factored out of make_runtime_env so it can be unit-tested without touching env vars.
make_runtime_env
Creates a new DataFusion RuntimeEnv with a configurable memory pool.
parse_max_temp_directory_mb
Parses the raw MICROMEGAS_DATAFUSION_MAX_TEMP_DIRECTORY_MB value (as returned by std::env::var) into an optional MB budget: Ok(None) when the variable is unset, Err when it is set to something that doesn’t parse as u64. Factored out of make_runtime_env so the parse-failure path can be unit-tested without setting a real process env var, which would race with other tests running in parallel in the same process.
scoped_runtime
Builds a RuntimeEnv that reuses shared’s disk manager, caches and object-store registry but installs scoped_pool (already wrapping shared’s memory pool) as its memory pool. Takes the pool as a parameter, rather than constructing it internally, so callers can hand the (infallible) pool to QueryAuditState before this fallible step runs.