← Back to Pull requests

Fix Delta optimized write on a partitioned table with column mapping enabled #16827

Closed
unknown closed this pull request without merging on Nov 18, 2026 01:10 UTC
View on GitHub
unknown unknown commented on Nov 10, 2026 18:36 UTC
Author

Fixes #16796.

Description

GPU optimized writes to partitioned Delta tables using name or id column mapping fail with NoSuchElementException: None.get. Shuffle planning searches for physical partition-column names in plan output that uses logical names.

Resolve partition attributes using logical names and case-insensitive matching, preserve the synthetic __is_cdc column for change data capture, and replace the unchecked lookup with a descriptive error. Update both open-source Delta and Databricks implementations.

Regression coverage includes column mapping with optimized write and adaptive execution enabled/disabled, plus UPDATE writes with change data capture. Validation passed:

  • 17 cases on Spark 3.5.5 / Delta 3.3.3.

  • 12 regression cases per version on Delta 4.0.1, 4.1.0, 4.2.0, and 4.3.0.

  • Style and static shim coverage checks.
  • A benchmark on Spark 3.5.5 / Delta 3.3.3 used one RTX A5500, 6,666,664 rows, eight approximately 100 MB input partitions, four table partition values, cached input, Snappy compression, and adaptive execution disabled. Ten measured writes per configuration followed warm-ups; the unmapped comparison ran in both build orders.

    | Column mapping | Pre-fix median | Fixed median |
    |---|---:|---:|
    | Disabled | 4\.524 s | 4\.529 s |
    | name | None.get failure | 4\.635 s |

    The unmapped workload changed by +0.12%, within observed timing variation. All output checksums matched.

    AI assistance was used for implementation, validation, and review.

    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: 246 lines (+184 / -62) across 3 files Reviewer: sdrp713 Review duration: 10474m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 246 lines diff across 3 files
    0.39
    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.330
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16827"
    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: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    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: 15.4% · Safe to merge
    15.4%