← Back to Pull requests

Fall back to CPU for Delta 4.3 delta.parquet.format.version DataPageV2 writes #16996

Closed
unknown closed this pull request without merging on Nov 26, 2026 00:38 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 21:25 UTC
Author

Fixes #16995.

Description

Problem. OSS Delta Lake 4.3 lets a table choose the Parquet data page version of the files Delta writes, through the delta.parquet.format.version table property (or the parquet.writer.version session conf when the property is unset). The GPU Parquet writer only emits DataPageV1, so a write that asks for DataPageV2 must not be accelerated: running it on the GPU would silently produce V1 files for a table that claims v2.

After this change. A Delta 4.3 write whose requested version resolves to 1.0.0, or that requests none, still runs on the GPU. A write that resolves to a newer version falls back to the CPU for append, overwrite, CTAS, RTAS, UPDATE, DELETE, MERGE, OPTIMIZE, REORG, replaceWhere and dynamic partition overwrite. Invalid values also fall back, so the CPU raises Delta's own validation error.

Implementation The check reuses Delta's own TableParquetVersionOption.getWriterOptions, so precedence
(write option, then table property, then parquet.writer.version, then v1) and the version resolution match what the commit-time writer does. Delta 4.3 only knows 1.0.0 and 2.12.0, so 2.0.0–2.11.x resolve to v1 and stay on the GPU. This is a difference from the protocol text, and it follows Delta's implementation.

  • DeltaConfigChecker gets a new checkTableProperties method with a no-op default, so other Delta versions are unaffected. RapidsDeltaUtils.tagForDeltaWrite calls it for existing tables, with the plan's session and the table's current properties (read lazily).

  • Delta43xProvider calls it for CTAS and RTAS with the properties after DeltaConfigs.mergeGlobalConfigs, so a version set only through Delta's global table-property default is honoured.

  • Delta43xConfigChecker matches the property and write-option keys case-insensitively. Delta matches them exactly but normalizes their case in its catalog and commit path.
  • Testing. New integration tests in delta_lake_write_test.py inspect Parquet page headers rather than only rows:

  • v2 requests fall back and produce DataPageV2, and v1, unset and 2.5.0 stay on the GPU with DataPageV1.

  • The session conf and Delta's table-property default, mixed-case keys, and precedence between write option, table property and conf.

  • Invalid values, and a mixed v1/v2 table with a Delta checkpoint read on the GPU.

  • UPDATE, DELETE, MERGE, OPTIMIZE (plus ZORDER), REORG PURGE, INSERT OVERWRITE and REPLACE WHERE, and the DataFrameWriter variants (save, partitioned append, replaceWhere, dynamic partition overwrite, saveAsTable).

  • The tests force the CPU side to really write DataPageV2 through the Hadoop configuration, because Delta 4.3.0 on Spark before 4.2 ignores the property on the CPU. Without that, the GPU and CPU page types would both be V1 and the comparison would prove nothing.

  • Before the final fix, the mixed-case and global-default cases wrote on the GPU for a v2 table. The new tests fail on that build and pass on this one.
  • Run on a GPU host:

  • Spark 4.0.1 and 4.1.1, each with Delta 4.3.0: all 68 new tests pass.

  • Write smoke test (test_delta_write_round_trip_unmanaged) on Spark 4.1.1 with Delta 4.2.0 and 4.1.0, Spark 4.0.1 with Delta 4.2.0 and 4.0.1, and Spark 3.5.7 with Delta 3.3.0: pass.

  • Compile and scalastyle pass for profiles 330, 340, 353 (Scala 2.12 and 2.13), 357, 400, 401 and 411, which covers Delta 2.1–4.3 modules.
  • Performance. The only new work is a planning time check. Measured on a Spark 4.1.1 cluster (8 GPU executors, 100M-row seed, Delta 4.3.0), main vs this branch with 10 samples per arm across two arm orders, GPU write nodes confirmed in both arms and identical output fingerprints with DataPageV1 with three Delta write workloads: CTAS with default settings, CTAS with delta.parquet.format.version=1.0.0, and a default append. Median times were within about 3% (3.35 s vs 3.41 s, 2.01 s vs 1.97 s, 1.98 s vs 1.93 s), so the change has no measurable cost on writes that stay on the GPU.

    | Case | main median | branch median | ratio |
    |---|---|---|---|
    | CTAS, default | 3.35 s | 3.41 s | 0.983 |
    | CTAS, 1.0.0 property | 2.01 s | 1.97 s | 1.018 |
    | Append, default | 1.98 s | 1.93 s | 1.024 |

    Checklists

    Documentation

  • Updated for new or modified user-facing features or behaviors

  • No user-facing change
  • Testing

  • Added or modified tests to cover new code paths

  • Covered by existing tests

  • (Please provide the names of the existing tests in the PR description.)
  • Not required
  • Performance

  • Tests ran and results are added in the PR description

  • Issue filed with a link in the PR description

  • Not required
  • Diff: 592 lines (+444 / -148) across 7 files Reviewer: sdrp713 Review duration: 11712m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 592 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.382
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16996"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 50.0% (MEDIUM) · Higher = larger blast radius
    50.0%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 19.8% · Safe to merge
    19.8%