← Back to Pull requests

Fall back to the CPU instead of failing or misreading Delta tables on unsupported Delta runtimes #17155

Closed
unknown closed this pull request without merging on Nov 26, 2026 10:44 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 03:03 UTC
Author

Fixes #16876.
Fixes #17004.
Fixes #17045.

Description

Ports #16877 from release/26.10 to main, and additionally validates main-specific planning hooks (getScans and isPushDVPredicateDownEnabled) and ensures Delta 4.4+ versions do not fall through to pre-4.2 shims.

Spark plans queries through the Delta provider probe when a Delta Lake JAR is installed. An unsupported Spark and Delta combination or a shim linkage failure can break unrelated queries. Return NoDeltaProvider for unsupported combinations and recoverable loading or planning-hook linkage failures so non-Delta operations continue to use the GPU, while fatal errors still propagate.

A scan over an unclaimed Parquet subclass must use Spark's scan implementation. The shared guard in ExternalSource.tagUnclaimedParquetSubclass applies to open-source Spark builds and the Databricks 17.3/18.3 scan shim (spark400db173) so Delta column mapping retains its semantics when the probe cannot supply a compatible provider, while formats claimed by an active provider continue to plan on the GPU.

Validation (Java 17)

  • main (buildver=401, Scala 2.13, GPU): built and installed modules through tests; DeltaProbeImplSuite, DeltaRuntimeShimSuite, and ParquetScanSuite passed 51 tests under default Delta 4.2.0 (11 Delta 4.3-specific cases canceled), and DeltaProbeImplSuite + DeltaRuntimeShimSuite passed 26 tests under -Pdelta43-tests with Delta 4.3.0 (1 Spark 4.1-specific case canceled). Covers unsupported-shim None selection (including Delta 4.4+/5.0), post-construction getScans/planning-hook LinkageError fallback, fatal error propagation, unclaimed ParquetFileFormat subclass CPU fallback, and claimed subclass GPU scan eligibility.

  • main (buildver=356, Scala 2.12): built and installed 17 modules through tests; Delta33RuntimeShimSuite passed 1/1 on 104406fef (verifies the Spark 3.5.3+ getShimClassName dispatch branch directly).

  • All-module Scalastyle (2,129 files, 0 errors/warnings) and Apache RAT passed.

  • Shim compatibility preflight (base=939b63acd, head=47e4e9806; follow-ups d27ed39ff and 104406fef only touch delta-lake and tests): review returned PASS across 34 sql-plugin buildvers (including 400db173 and 410db183, 4,442 checked requirements, 0 new findings). advisory flagged open PR #17137 as overlapping DeltaRuntimeShim.scala/DeltaRuntimeShimSuite.scala (merge-conflict coordination only) and found NO_NEW_INTERACTION_FINDINGS on #17099 and #17106.

  • Prior end-to-end verification of the same fallback and scan-guard logic on Spark 3.5.6 (Scala 2.12) confirmed ordinary Parquet stays on GPU while Delta 3.2.1 column-mapping/DV scans stay on CPU with matching results, and Delta 3.3.3 scans run on GPU with matching results.

  • Not verified locally: Databricks 17.3/18.3 runtime execution (covered by Databricks pre-merge CI).
  • AI assistance from Claude Code, Codex, and Devin was used to prepare and validate this port.

    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

  • Not required
  • Performance

  • Tests ran and results are added in the PR description

  • Issue filed with a link in the PR description

  • Not required
  • The guard and provider probe run only during query planning and one-time provider initialization. Supported formats keep their existing GPU execution paths, and unclaimed Parquet subclasses use Spark's CPU scan to preserve format-specific semantics.

    Diff: 454 lines (+340 / -114) across 5 files Reviewer: thirtiseven Review duration: 461m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 454 lines diff across 5 files
    0.45
    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%
    56%
    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.366
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #17155"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 45.5% (MEDIUM) · Higher = larger blast radius
    45.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: 56.8% · Lower = rushed or shallow review
    56.8%
    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.7% · Safe to merge
    19.7%