← Back to Pull requests

Remove experimental DataFusion TableProvider integration #4547

Open
kevinjqliu opened this pull request with 237 lines diff across 7 files
View on GitHub
kevinjqliu kevinjqliu commented on Dec 01, 2026 19:27 UTC
Author

<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

Rationale for this change

Follow-up to apache/iceberg-rust#3143 (context in apache/iceberg-rust#3036), which removed pyiceberg_core.datafusion.IcebergDataFusionTable from pyiceberg-core.

The experimental Table.__datafusion_table_provider__ integration (added in #2075) passed metadata to iceberg-rust instead of using PyIceberg's scan implementation, and coupled pyiceberg-core to DataFusion's FFI ABI major version. Removing it lets us drop the datafusion extra (moved to dev for tests/table/test_upsert.py), remove the <0.11.0 upper bound on pyiceberg-core, and unpin Dependabot on datafusion.

Are these changes tested?

  • uv run python -m pytest -m unit tests/table/test_upsert.py tests/test_transforms.py -q: 335 passed

  • make lint (ruff, ruff format, nbqa-ruff, mypy, markdownlint, codespell, uv-lock): passed
  • Are there any user-facing changes?

    Yes. Removes the experimental Table.__datafusion_table_provider__ method and the datafusion optional dependency.

    <!-- In the case of user-facing changes, please add the changelog label. -->

    Diff: 237 lines (+30 / -207) across 7 files Reviewer: Fokko Review duration: 47m
    All Vouch review confidence checks passed
    Residual risk 0.06 = Change Risk (0.45) × (1 − Review Confidence (0.86)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 237 lines diff across 7 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.80 · 2 substantive comment(s)
    0.80
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    85%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.327
    Real PR Conversation Timeline
    5 items
    copilot-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Dec 01, 2026 19:29 UTC
    Reviewer

    <!-- ccr-overview-v2 -->

    🟢 Approval recommended

    No active review issues remain for the removal of the experimental DataFusion integration.

    No open issues 🎉

    <details>
    <summary><strong>What changed in this PR</strong></summary>

    Removes PyIceberg’s experimental DataFusion TableProvider integration following its removal from pyiceberg-core, eliminating the associated DataFusion ABI version coupling.

    Changes:

  • Removes the table-provider method, its dedicated test, and integration documentation.

  • Moves DataFusion from an optional extra to development dependencies for upsert tests.

  • Removes the pyiceberg-core upper bound and DataFusion’s Dependabot exclusion, updating the lockfile.
  • | File | Description |
    | ---- | ----------- |
    | uv.lock | Updates dependency metadata and locks newer DataFusion and pyiceberg-core versions. |
    | tests/​table/​test_datafusion.py | Deletes the removed integration’s test. |
    | pyproject.toml | Moves DataFusion to development dependencies and relaxes the core version constraint. |
    | pyiceberg/​table/​__init__.py | Removes Table.__datafusion_table_provider__ and its type import. |
    | mkdocs/​docs/​index.md | Removes the DataFusion optional-extra listing. |
    | mkdocs/​docs/​api.md | Removes TableProvider integration documentation and examples. |
    | .github/​dependabot.yml | Allows automated DataFusion dependency updates. |
    </details>

    <sub>Review effort: Balanced</sub>

    kevinjqliu kevinjqliu commented on code on Dec 01, 2026 19:31 UTC
    Code Review
    mkdocs/docs/api.md:1
    @@ -2278,69 +2278,6 @@ shape: (11, 4)
     └───────────┴─────────────┴────────────────────────────┴─────────────────────┘
     ```
     
    -### Apache DataFusion

    we list this as "experimental" so i think we can remove without a deprecation cycle

    kevinjqliu kevinjqliu commented on code on Dec 01, 2026 19:32 UTC
    Code Review
    pyproject.toml:1
    @@ -129,6 +125,7 @@ dev = [
         "nbformat>=5.10.0",
         "ipykernel>=6.29.0",
         "ty==0.0.92",
    +    "datafusion>=53",
    Fokko Fokko approved these changes on Dec 01, 2026 19:40 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    kevinjqliu kevinjqliu
    Labels
    risk: low confidence: 85.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.5% (MEDIUM) · Higher = larger blast radius
    44.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 85.9% · Lower = rushed or shallow review
    85.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 6.3% · Safe to merge
    6.3%