← Back to Pull requests

[Kernel] Type future-version failures for UC reads #7771

Closed
unknown closed this pull request without merging on Oct 05, 2026 20:54 UTC
View on GitHub
unknown unknown commented on Sep 30, 2026 09:58 UTC
Author

Which Delta project/connector is this regarding?

  • Spark

  • Standalone

  • Flink

  • Kernel

  • Other (fill in here)
  • Description

    UCCatalogManagedClient throws IllegalArgumentException when a requested snapshot version or commit-range boundary exceeds UC's latest ratified version. CDF streaming with startingVersion=latest requests latest + 1, so consumers need to distinguish an unavailable version from malformed arguments and other failures.

    Add VersionToLoadAfterLatestCommitException and use it for snapshot versions and explicit start/end versions above the catalog maximum, preserving the diagnostic messages. Invalid argument combinations, negative snapshot versions, and reversed ranges retain IllegalArgumentException. This supplies the precise UC failure type needed by #7754.

    Tests cover both the Kernel client and Spark snapshot-manager boundaries. This change shares the exception definition proposed in #7055, with contributor credit preserved, but does not include or depend on that PR's path-based or truncated-history changes. Either PR can merge first; the other can then reuse the shared class. Related to #6745.

    How was this patch tested?

  • Regression tests cover snapshot, range-start, and range-end versions at latest + 1 and farther ahead, including exact exception type and diagnostic messages in the Kernel tests. The new future-version cases failed with the old IllegalArgumentException before their production changes.

  • All 52 tests passed across UCCatalogManagedClientSuite, UCCatalogManagedClientCommitRangeSuite, and UcLoadSnapshotTelemetrySuite.

  • All 10 UCManagedTableSnapshotManagerSuite tests passed on Spark 4.0, including propagation of the typed exception for future snapshot and range-boundary versions.

  • Earlier validation passed all 51 SnapshotManagerSuite tests without the path-based changes from #7055; that code is unchanged by the commit-range update.

  • Build-enforced Java/Scala formatting and Checkstyle, plus git diff --check, passed.
  • Commands (Java 17):

    ./build/sbt 'kernelUnityCatalog/testOnly io.delta.kernel.unitycatalog.UCCatalogManagedClientSuite io.delta.kernel.unitycatalog.UCCatalogManagedClientCommitRangeSuite io.delta.kernel.unitycatalog.UcLoadSnapshotTelemetrySuite'
    ./build/sbt 'kernelApi/testOnly io.delta.kernel.internal.SnapshotManagerSuite'
    ./build/sbt -DsparkVersion=4.0 'sparkV2/testOnly io.delta.spark.internal.v2.snapshot.unitycatalog.UCManagedTableSnapshotManagerSuite'
    

    Does this PR introduce _any_ user-facing changes?

    Yes. A UC snapshot request or explicit commit-range start/end version above the latest ratified version now throws VersionToLoadAfterLatestCommitException (a KernelException) instead of IllegalArgumentException. The messages are unchanged. Callers handling this condition should catch the specific type.

    Diff: 360 lines (+270 / -90) across 4 files Reviewer: huan233usc Review duration: 7856m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 360 lines diff across 4 files
    0.43
    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.352
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7771"
    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.6% (MEDIUM) · Higher = larger blast radius
    42.6%
    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.8% · Safe to merge
    16.8%
    Repository