Uh oh!
There was an error while loading. Please reload this page.
Implement configuration extension support - #1391
Conversation
c54db11 to
58fef4cCompareUh oh!
There was an error while loading. Please reload this page.
68f0283 to
274d9e7CompareThere was a problem hiding this comment.
Pull request overview
Adds support for DataFusion configuration extensions so Python SessionConfig can be augmented with upstream/FFI-provided extension options (and demonstrates usage via the FFI example crate).
Changes:
- Add
SessionConfig.with_extension(...)to pass config extensions through the Python API. - Implement
PySessionConfig.with_extension(...)in Rust, extracting/mergingFFI_ExtensionOptionsfrom a PyCapsule. - Extend the FFI example crate with a
MyConfigextension and a Python test demonstratingSHOW/SETagainst the extension.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| python/datafusion/context.py | Exposes SessionConfig.with_extension(...) on the public Python wrapper. |
| crates/core/src/context.rs | Adds Rust binding logic to extract/merge extension options from a Python object/capsule. |
| crates/core/src/dataset_exec.rs | Minor type annotation change for schema (clarifies type inference). |
| examples/datafusion-ffi-example/src/lib.rs | Registers the new config module and exports MyConfig to Python. |
| examples/datafusion-ffi-example/src/config.rs | Implements a sample ConfigExtension/ExtensionOptions plus a capsule exporter method. |
| examples/datafusion-ffi-example/python/tests/_test_config.py | Adds an example test covering config extension usage via SHOW/SET. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Which issue does this PR close?
Closes#1390
Rationale for this change
With the upstream repository now supporting FFI configuration options, we should support these in
datafusion-python.What changes are included in this PR?
Adds methods to add config extensions to
SessionConfigAre there any user-facing changes?
New addition. Existing methods are not impacted.