timsaucer opened a new pull request, #1570: URL: https://github.com/apache/datafusion-python/pull/1570
# Which issue does this PR close? Closes #. No tracking issue; gap surfaced during the v54 upstream coverage audit. # Rationale for this change Two small additions to `SessionContext` that mirror the upstream API and were not previously surfaced. They round out the surface of inspectable session state and provide a typed parser for human-friendly size strings that callers otherwise have to reimplement when configuring a `RuntimeEnvBuilder`. # What changes are included in this PR? - `crates/core/src/context.rs`: add `copied_config` (returns `PySessionConfig`) and `parse_capacity_limit` (static method) on `PySessionContext`. The latter wraps `SessionContext::parse_capacity_limit`. The deprecated `SessionContext::parse_memory_limit` is intentionally not exposed. - `python/datafusion/context.py`: add `SessionContext.copied_config` returning a `SessionConfig` and `SessionContext.parse_capacity_limit` as a `@staticmethod`, both with doctest examples. ## Scope note The original audit also called out `runtime_env()` and `copied_table_options()`. Exposing those would require wrapping `Arc<RuntimeEnv>` (memory pool / disk manager / cache manager / object store registry) and `TableOptions` (typed config object) from scratch -- each of which is a larger surface than the accessor itself. Those are deferred to follow-up issues. # Are there any user-facing changes? Yes. Two new public members on `datafusion.SessionContext`: - `SessionContext.copied_config() -> SessionConfig` - `SessionContext.parse_capacity_limit(config_name, limit) -> int` (static) No breaking changes. -- 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]
