feat: Implement FFI_TableProviderFactory#17994
Closed
Weijun-H wants to merge 1 commit intoapache:mainfrom
Closed
Conversation
Member
|
I'm sorry I haven't had a chance to review this in detail. One thing we need is an integration test, similar to those in |
Member
|
Would you be able to add the test suggested above? |
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 21, 2026
> ## Which issue does this PR close? > * Closes [expose TableProviderFactory via FFI #17942](#17942) > This PR is re-opening PR #17994 and updating it to match the current FFI approach (I.e., I made it look like the FFI_TableProvider in various places). > ## Rationale for this change > Expose `TableProviderFactory` via FFI to enable external languages (e.g., Python) to implement custom table provider factories and extend DataFusion with new data source types. > > ## What changes are included in this PR? > * Added `datafusion/ffi/src/table_provider_factory.rs` with: > > * `FFI_TableProviderFactory`: Stable C ABI struct with function pointers for `create`, `clone`, `release`, and `version` > * `ForeignTableProviderFactory`: Wrapper implementing `TableProviderFactory` trait > > ## Are these changes tested? > Yes > I've also added the integration tests as requested in the original PR. > ## Are there any user-facing changes? > Yes - new FFI API that enables custom `TableProviderFactory` implementations in foreign languages. This is an additive change with no breaking changes to existing APIs. Also, I'd like to thank @Weijun-H for the initial version of this PR as it simplified getting up to speed on the serialization logic that I hadn't encountered yet. --------- Co-authored-by: Weijun-H <huangweijun1001@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Expose
TableProviderFactoryvia FFI to enable external languages (e.g., Python) to implement custom table provider factories and extend DataFusion with new data source types.What changes are included in this PR?
datafusion/ffi/src/table_provider_factory.rswith:FFI_TableProviderFactory: Stable C ABI struct with function pointers forcreate,clone,release, andversionForeignTableProviderFactory: Wrapper implementingTableProviderFactorytraitAre these changes tested?
Yes
Are there any user-facing changes?
Yes - new FFI API that enables custom
TableProviderFactoryimplementations in foreign languages. This is an additive change with no breaking changes to existing APIs.