Skip to content

Implement configuration extension support#1391

Merged
timsaucer merged 8 commits intoapache:mainfrom
timsaucer:feat/ffi-config-options
Mar 27, 2026
Merged

Implement configuration extension support#1391
timsaucer merged 8 commits intoapache:mainfrom
timsaucer:feat/ffi-config-options

Conversation

@timsaucer
Copy link
Copy Markdown
Member

@timsaucer timsaucer commented Feb 23, 2026

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 SessionConfig

Are there any user-facing changes?

New addition. Existing methods are not impacted.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/merging FFI_ExtensionOptions from a PyCapsule.
  • Extend the FFI example crate with a MyConfig extension and a Python test demonstrating SHOW/SET against 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.

timsaucer and others added 3 commits March 27, 2026 08:57
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>
@timsaucer timsaucer merged commit 75d07ce into apache:main Mar 27, 2026
19 checks passed
@timsaucer timsaucer deleted the feat/ffi-config-options branch March 27, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for external configuration

2 participants