Fall back to CPU for Delta 4.3 delta.parquet.format.version DataPageV2 writes #16996
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
sdrp713
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.versiontable property (or theparquet.writer.versionsession conf when the property is unset). The GPU Parquet writer only emitsDataPageV1, so a write that asks forDataPageV2must 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,replaceWhereand 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 knows1.0.0and2.12.0, so2.0.0–2.11.xresolve to v1 and stay on the GPU. This is a difference from the protocol text, and it follows Delta's implementation.DeltaConfigCheckergets a newcheckTablePropertiesmethod with a no-op default, so other Delta versions are unaffected.RapidsDeltaUtils.tagForDeltaWritecalls it for existing tables, with the plan's session and the table's current properties (read lazily).Delta43xProvidercalls it for CTAS and RTAS with the properties afterDeltaConfigs.mergeGlobalConfigs, so a version set only through Delta's global table-property default is honoured.Delta43xConfigCheckermatches 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.pyinspect Parquet page headers rather than only rows:DataPageV2, and v1, unset and2.5.0stay on the GPU withDataPageV1.save, partitioned append,replaceWhere, dynamic partition overwrite,saveAsTable).DataPageV2through 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.Run on a GPU host:
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.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
DataPageV1with 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.0property | 2.01 s | 1.97 s | 1.018 || Append, default | 1.98 s | 1.93 s | 1.024 |
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance