Skip to content

Commit 5e32ada

Browse files
authored
Add foreign table providers (#921)
* testing FFI for table provider * Was able to get round trip schema from datafusion -> delta table -> datafusion * Expand file structure * WIP on execution plan * Working through execution plan FFI * Using datafusion-proto for execution plan properties * Adding plan properties parsing from ffi * Standardize naming for FFI structs * Intermediate testing and troubleshooting * Adding record batch stream ffi representation * Mimimum viable product demonstrating foreign table provider * Move ffi module to datafusion core * Modifications need to compile against latest DF * Set DF to 42.0.0 * Rebasing and pulling in a few changes for DF43.0 * Add wrapper for register table provider * Suppress deprecation warning * Add example for FFI table provider * Add pytest for FFI module to CI * Add license text * Change the name of the FFI table provider test so it doesn't try to run during the first pass of pytest when the module hasn't been built * Build example in build stage to be used during test stage * Combine pytests into one stage * Fix path for unit test * Installing maturin for ffi test in test script * Need to install the wheel for unit test * Add online documentation about using custom table providers * Raise an error if method is not implemented when it is expected
1 parent 53cdb11 commit 5e32ada

File tree

16 files changed

+4078
-89
lines changed

16 files changed

+4078
-89
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ jobs:
156156
repo-token: ${{ secrets.GITHUB_TOKEN }}
157157

158158
- name: Build Python package
159-
run: maturin build --release --strip --features substrait
159+
run: |
160+
maturin build --release --strip --features substrait
161+
160162
- name: List Mac wheels
161163
run: find target/wheels/
162164

.github/workflows/test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ jobs:
110110
pip install -e . -vv
111111
pytest -v .
112112
113+
- name: FFI unit tests
114+
run: |
115+
source venv/bin/activate
116+
pip install -e . -vv
117+
pip install maturin==1.5.1
118+
cd examples/ffi-table-provider
119+
maturin develop --release --strip
120+
pytest python/tests/_test_table_provider.py
121+
113122
- name: Cache the generated dataset
114123
id: cache-tpch-dataset
115124
uses: actions/cache@v4

0 commit comments

Comments
 (0)