← Back to Pull requests

Test Delta 4.3 dynamic partition overwrite partition value normalization on GPU [databricks] #16611

Closed
unknown closed this pull request without merging on Nov 18, 2026 14:37 UTC
View on GitHub
unknown unknown commented on Oct 26, 2026 17:39 UTC
Author

Fixes #16610.

Delta Lake 4.3 normalizes partition values when dynamic partition overwrite decides which files to remove, so equivalent but differently formatted values (timestamps, dates, decimals) match. The GPU Delta 4.3 write path already passes the new AddFiles to Delta's txn.filterFiles(Seq[AddFile]), which does the normalization, so no plugin code changes are needed. This PR adds integration tests showing the GPU matches the CPU.

New tests in delta_lake_write_test.py rewrite the stored partition strings in the table logs, then run a DPO write on CPU and GPU. Each test checks the final rows, the removed AddFile partition values (which must be exactly the respelled strings), and, where possible, the full CPU/GPU logs:

  • timestamp, date, decimal, integer and string (negative control) partitions with null partitions, under UTC and America/Los_Angeles, including microseconds, the DST fall-back hour, and mixed spellings in one table

  • the DPO entry points: writer option, session conf, insertInto, saveAsTable, and SQL INSERT OVERWRITE on a table with two partition columns

  • a renamed physical partition column (column mapping)

  • parsePartitionValues=false, where raw string comparison applies

  • an empty replacement, which removes nothing

  • an unparseable partition value: by default Delta falls back to raw string comparison for the whole table, and with failOnPartitionValueParsingError=true both CPU and GPU fail with the same error and commit nothing. The GPU write is verified to run on the GPU in both cases.
  • The tests run only on Delta 4.3 and skip otherwise. The saveAsTable case depends on #16647 (V1 saveAsTable overwrite detection on Spark 4.x), which is already on main.

    Performance tests are not required because this change only adds regression tests and does not modify runtime code or the existing GPU write path.

    Validation

    Run locally on a GPU (RTX 6000 Ada), Delta 4.3.0, plugin built from main plus this change:

  • Spark 4.0.1 and Spark 4.1.1, Python 3.10: the DPO tests, 24 passed, 0 failed, on each

  • Spark 4.0.1 and Spark 4.1.1, Python 3.12: the full delta_lake_write_test.py, 144 and 147 passed, 0 failed, run before the latest review fixes
  • 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: 340 lines (+255 / -85) across 4 files Reviewer: sdrp713 Review duration: 32938m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 340 lines diff across 4 files
    0.42
    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.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16611"
    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: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    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: 16.7% · Safe to merge
    16.7%