refactor(pyiceberg-core): remove DataFusion TableProvider export - #3143
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The DataFusion binding/export and all in-repo references/tests/dependencies appear consistently removed, with explicit Arrow feature replacement and updated lockfiles/inventory.
Pull request overview
This PR removes the experimental DataFusion integration from the pyiceberg-core Python bindings, decoupling the bindings from DataFusion’s FFI/compat constraints while preserving Arrow timezone behavior by enabling the needed Arrow feature directly.
Changes:
- Removes the
pyiceberg_core.datafusionmodule /IcebergDataFusionTableexport and associated Rust glue code (including the Tokio runtime helper). - Drops DataFusion/FFI and related dev/test dependencies, and deletes DataFusion- and Hugging Face–specific tests.
- Regenerates Rust/Python lockfiles and the Rust dependency/license inventory, and enables Arrow’s
chrono-tzfeature explicitly for the bindings crate.
File summaries
| File | Description |
|---|---|
| Cargo.lock | Removes DataFusion/FFI-related Rust dependencies from the resolved graph for the Python bindings. |
| bindings/python/uv.lock | Updates Python lockfile to drop DataFusion and other removed dev/test dependencies. |
| bindings/python/tests/test_huggingface_and_cdc.py | Deletes Hugging Face + CDC + DataFusion integration tests tied to the removed export. |
| bindings/python/tests/test_datafusion_table_provider.py | Deletes DataFusion table provider binding tests tied to the removed export. |
| bindings/python/src/runtime.rs | Removes Tokio runtime helper previously used for DataFusion provider construction. |
| bindings/python/src/lib.rs | Stops registering the removed datafusion submodule in the extension module. |
| bindings/python/src/datafusion_table_provider.rs | Deletes the Rust implementation of the IcebergDataFusionTable PyO3 class and capsule export. |
| bindings/python/pyproject.toml | Removes DataFusion/Hugging Face dev deps and warning ignore; keeps warnings-as-errors. |
| bindings/python/DEPENDENCIES.rust.tsv | Regenerates the Rust dependency license inventory after dependency removals. |
| bindings/python/Cargo.toml | Drops DataFusion/FFI/OpenDAL/Tokio deps; enables arrow’s chrono-tz feature explicitly. |
Review details
- Files reviewed: 8/10 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Remove the DataFusion table provider export, its tests, and its Rust and Python dependency trees from pyiceberg-core. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
8e18537 to
40e9e3c
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| [dependencies] | ||
| arrow = { workspace = true, features = ["pyarrow"] } | ||
| datafusion-ffi = { workspace = true } | ||
| arrow = { workspace = true, features = ["chrono-tz", "pyarrow"] } |
There was a problem hiding this comment.
DataFusion previously enabled Arrow’s chrono-tz feature transitively, test_year_transform_with_tz requires it
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| filterwarnings = [ | ||
| "error", | ||
| # huggingface_hub uses hf_xet.upload_files() internally which is deprecated in hf_xet | ||
| "ignore::DeprecationWarning:huggingface_hub", |
There was a problem hiding this comment.
this was needed by the now removed bindings/python/tests/test_huggingface_and_cdc.py file
There was a problem hiding this comment.
removing this too since it rely on IcebergDataFusionTable
|
thanks @CTTY |
…tale audit ignores (#3149) Follow-up cleanup after the DataFusion TableProvider removal (#3143). - Remove `datafusion-ffi` from workspace deps; nothing inherits it since the Python binding no longer exports a TableProvider. - Remove `aes` and `thrift` workspace deps; no crate inherits them (encryption uses the AES types re-exported by `aes-gcm`). - Drop audit ignores whose advisory no longer matches any locked crate: RUSTSEC-2024-0014 (generational-arena, gone with datafusion-ffi), RUSTSEC-2024-0388 (derivative), RUSTSEC-2025-0134 (rustls-pemfile), RUSTSEC-2026-0097 (rand, all locked versions patched), RUSTSEC-2026-0176/0177 (pyo3, lock is on 0.29.1). - Drop the unmatched MPL-2.0 license exception for generational-arena. Cargo.lock is unchanged. Verified with `cargo check --workspace --all-targets --all-features`, `cargo audit`, and `cargo deny check licenses`. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Which issue does this PR close?
TableProviderexport from the Python bindings #3036.What changes are included in this PR?
pyiceberg_core.datafusionmodule andIcebergDataFusionTableexport.iceberg-datafusion, OpenDAL, and Tokio dependencies frompyiceberg-core.chrono-tzfeature directly to preserve timezone transform behavior previously enabled transitively by DataFusion.Wheel size impact
Release wheels built from latest
mainand this PR with the same Maturin/Python toolchain on macOS arm64:mainThis reduces the wheel by 12.84 MiB (91.8%).
Are these changes tested?
uv 0.9.3 lock --checkuv 0.9.3cargo check -p pyiceberg_core_rustcargo fmt --all -- --checkcargo deny check licenseAI Disclosure
GitHub Copilot assisted with implementation, dependency cleanup, testing, and review.
Kevin reviewed everything again 😄