timsaucer opened a new pull request, #19469:
URL: https://github.com/apache/datafusion/pull/19469

   ## Which issue does this PR close?
   
   This addresses part of https://github.com/apache/datafusion/issues/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`:
   
   ```python
   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?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


-- 
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]

Reply via email to