-
Notifications
You must be signed in to change notification settings - Fork 1.8k
FFI support for versions and alternate tokio runtimes #13937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
timsaucer
merged 19 commits into
apache:main
from
timsaucer:feat/ffi_enter_tokio_runtime
Feb 1, 2025
Merged
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0dd45d7
Add optional reference to tokio runtime for table providers
timsaucer 4087f83
Add function to return the library version over FFI
timsaucer 5b085fa
Resolve clippy warnings
timsaucer 766ec26
Function does not need to be defined as unsafe
timsaucer f75ba36
Add integration test for FFI table provider
timsaucer f62d5bd
Add version call on FFI integration test
timsaucer 8f66b4e
Making use explicit on crate to try to get CI to ensure it builds first
timsaucer 883ec48
Add license text
timsaucer ef5e8b6
Fix unit test to find deps in ci profile
timsaucer ccab80c
Remove ffitest crate and put test lib behind a feature flag
timsaucer d90dcd7
Add integation-tests feature to ci tests
timsaucer a4db812
Add integration-tests feature to CI run
timsaucer f2752ce
Add clarifying text
timsaucer 9e5924c
Update CI to only run integration tests for certain checks
timsaucer ccf9804
When the feature integtation-tests is enabled, we get conflicting lib…
timsaucer bb2a87a
Remove typo
timsaucer 08f1748
Specify each excluded crate separately
timsaucer 44abeb8
Doc tests did not need the exclusion
timsaucer bdf5acc
Integration tests shouldn't need doc test
timsaucer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| [package] | ||
| name = "datafusion-ffi-test" | ||
| description = "Integration tests for DataFusion FFI" | ||
| version = { workspace = true } | ||
| edition = { workspace = true } | ||
| homepage = { workspace = true } | ||
| repository = { workspace = true } | ||
| license = { workspace = true } | ||
| authors = { workspace = true } | ||
| publish = false | ||
| # Specify MSRV here as `cargo msrv` doesn't support workspace version | ||
| rust-version = "1.80.1" | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
|
||
| [lib] | ||
| name = "datafusion_ffi_test" | ||
| crate-type = ["cdylib", "rlib"] | ||
|
|
||
| [dependencies] | ||
| abi_stable = "0.11.3" | ||
| arrow = { workspace = true } | ||
| arrow-array = { workspace = true } | ||
| arrow-schema = { workspace = true } | ||
| async-trait = { workspace = true } | ||
| datafusion = { workspace = true, default-features = false } | ||
| datafusion-ffi = { workspace = true } | ||
| futures = { workspace = true } | ||
| tokio = { workspace = true } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont see this used anywhere in this PR to guard against unsafe boundary; please ignore if the PR is still WIP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding an additional note in the description that this function call is intended to be used by projects that are exposing libraries over FFI. Since that may be done in a couple of different ways such as either dynamic linking of a library or jumping through python, it's up to the downstream users to make the calls to this function and see if they are compatible. Also, since it is possible that the FFI bindings do not evolve over some datafusion versions you may have a case where multiple versions are compatible and don't require the same major version.