Skip to content
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

FFI initial implementation #12920

Merged
merged 28 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4bb3d58
Initial commit of FFI table provider code
timsaucer Oct 10, 2024
4d31722
Add table type
timsaucer Oct 10, 2024
d5f541e
Make struct pub
timsaucer Oct 10, 2024
afeb439
Implementing supports_filters_pushdown
timsaucer Oct 10, 2024
7fb77da
Move plan properties over to its own file
timsaucer Oct 10, 2024
3ab0f9f
Adding release function
timsaucer Oct 10, 2024
c616227
Adding release functions to additional structs
timsaucer Oct 10, 2024
461b4a9
Resolve memory leaks
timsaucer Oct 10, 2024
0408a9b
Rename ForeignExecutionPlan for consistency
timsaucer Oct 10, 2024
7922d8f
Resolving memory leak issues
timsaucer Oct 14, 2024
afd06be
Remove debug statements. Create runtime for block_on operations
timsaucer Oct 15, 2024
dafc982
Switching over to stable abi and async-ffi
timsaucer Oct 16, 2024
ff4d2e4
Make consistent the use of Foreign and FFI on struct names
timsaucer Oct 16, 2024
1dbca58
Apply prettier
timsaucer Oct 17, 2024
7761c84
Format for linter
timsaucer Oct 17, 2024
d0f8f88
Add doc-comment
timsaucer Oct 17, 2024
6b5227e
Add option to specify table provider does not support pushdown filter…
timsaucer Oct 21, 2024
400f45a
Remove setting default features in cargo file
timsaucer Oct 21, 2024
8b220cd
Tokio only needed for unit tests
timsaucer Oct 21, 2024
8d0f86d
Provide log errors rather than failing silently on schema requests
timsaucer Oct 21, 2024
9c01f75
Set default features for datafusion to false in ffi crate
timsaucer Oct 21, 2024
61f44ae
Using TryFrom or From instead of implementing new when there is only …
timsaucer Oct 26, 2024
1576520
Move arrow wrappers into their own file
timsaucer Oct 26, 2024
790f454
Add documentation
timsaucer Oct 26, 2024
bf626f4
Small adjustment to documentation
timsaucer Oct 27, 2024
bb47819
Add license text
timsaucer Oct 30, 2024
71ae880
Fix unnecessary qualification
timsaucer Oct 30, 2024
011340c
taplo format
timsaucer Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initial commit of FFI table provider code
  • Loading branch information
timsaucer committed Oct 30, 2024
commit 4bb3d584b049ee8b83adf1157c5e137c80a9c6aa
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ members = [
"datafusion/expr",
"datafusion/expr-common",
"datafusion/execution",
"datafusion/ffi",
"datafusion/functions",
"datafusion/functions-aggregate",
"datafusion/functions-aggregate-common",
Expand Down Expand Up @@ -99,6 +100,7 @@ datafusion-common-runtime = { path = "datafusion/common-runtime", version = "42.
datafusion-execution = { path = "datafusion/execution", version = "42.1.0" }
datafusion-expr = { path = "datafusion/expr", version = "42.1.0" }
datafusion-expr-common = { path = "datafusion/expr-common", version = "42.1.0" }
datafusion-ffi = { path = "datafusion/ffi", version = "42.1.0" }
datafusion-functions = { path = "datafusion/functions", version = "42.1.0" }
datafusion-functions-aggregate = { path = "datafusion/functions-aggregate", version = "42.1.0" }
datafusion-functions-aggregate-common = { path = "datafusion/functions-aggregate-common", version = "42.1.0" }
Expand Down
45 changes: 45 additions & 0 deletions datafusion/ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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"
description = "Foreign Function Interface implementation for DataFusion"
readme = "README.md"
version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
# Specify MSRV here as `cargo msrv` doesn't support workspace version
rust-version = "1.76"

[lints]
workspace = true

[lib]
name = "datafusion_ffi"
path = "src/lib.rs"

[dependencies]
arrow = { workspace = true, features = ["ffi"] }
datafusion = { workspace = true, default-features = true }
datafusion-proto = { workspace = true }
futures = { workspace = true }
async-trait = { workspace = true }
tokio = { workspace = true }
prost = { workspace = true }
28 changes: 28 additions & 0 deletions datafusion/ffi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!---
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.
-->

# `datafusion-ffi`: Apache DataFusion Foreign Function Interface

This crate contains code to allow interoperability of Apache [DataFusion]
with functions from other languages using a stable interface.
Comment on lines +22 to +23
Copy link
Contributor

Choose a reason for hiding this comment

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

It may also be good to point out that the ffi interface allows different versions of datafusion to interact with each other over stable interfaces in the intro

Suggested change
This crate contains code to allow interoperability of Apache [DataFusion]
with functions from other languages using a stable interface.
This crate contains code to allow interoperability of Apache [DataFusion]
with functions from other languages and/or versions using a stable interface.


See [API Docs] for details and examples.

[datafusion]: https://datafusion.apache.org
[api docs]: http://docs.rs/datafusion-ffi/latest
Loading