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 ofmake_runtime_envso it can be unit-tested without touching env vars. - make_
runtime_ env - Creates a new DataFusion
RuntimeEnvwith a configurable memory pool. - parse_
max_ temp_ directory_ mb - Parses the raw
MICROMEGAS_DATAFUSION_MAX_TEMP_DIRECTORY_MBvalue (as returned bystd::env::var) into an optional MB budget:Ok(None)when the variable is unset,Errwhen it is set to something that doesn’t parse asu64. Factored out ofmake_runtime_envso 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
RuntimeEnvthat reusesshared’s disk manager, caches and object-store registry but installsscoped_pool(already wrappingshared’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 toQueryAuditStatebefore this fallible step runs.