Skip to content

Conversation

@timsaucer
Copy link
Member

Which issue does this PR close?

This addresses part of #17035

Rationale for this change

Currently we cannot support user defined configuration extensions via FFI. This is because much of the infrastructure on how to add and extract custom extensions relies on knowing concrete types of the extensions. This is not supported in FFI. This PR adds an implementation of configuration extensions that can be used across a FFI boundary.

What changes are included in this PR?

  • Implement FFI_ExtensionOptions.
  • Update ConfigOptions to check if a datafusion_ffi namespace exists when setting values
  • Add unit test

Are these changes tested?

Unit test added.

Also tested against datafusion-python locally. With this code I have the following test that passes. I have created a simple python exposed MyConfig:

from datafusion import SessionConfig
from datafusion_ffi_example import MyConfig

def test_catalog_provider():
    config = MyConfig()
    config = SessionConfig().with_extension(config)
    config.set("my_config.baz_count", "42")

Are there any user-facing changes?

@github-actions github-actions bot added common Related to common crate ffi Changes to the ffi crate labels Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate ffi Changes to the ffi crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant