You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "timsaucer (via GitHub)" <gi...@apache.org> on 2026/06/04 17:10:42 UTC

[PR] feat: expose SessionContext.copied_config and parse_capacity_limit [datafusion-python]

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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: expose SessionContext.copied_config and parse_capacity_limit [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on PR #1570:
URL: https://github.com/apache/datafusion-python/pull/1570#issuecomment-4633324400

   Minor addition, generated by agent but reviewed by myself.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: expose SessionContext.copied_config and parse_capacity_limit [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer merged PR #1570:
URL: https://github.com/apache/datafusion-python/pull/1570


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org