← Back to Pull requests

Fix AQE cache scan expectations on Spark 3.5.0 and 3.5.1 [databricks] #17129

Closed
unknown closed this pull request without merging on Nov 25, 2026 08:13 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 02:15 UTC
Author

Fixes #17125.

Description

On Spark 3.5.0, adaptive query execution (AQE) can wrap a cache scan in a table-cache query stage even when the input has no explicit repartition. The existing compatibility fallback keeps that scan on the CPU, but this test only expected the fallback for repartitioned input, causing five valid row-input cases to fail their GPU-scan assertion.

Extend the Spark 3.5.0/3.5.1 AQE fallback expectation to row input. Keep the Databricks 17.3+ condition and GPU-scan requirements for other supported versions unchanged. This is test maintenance only; production behavior and CPU/GPU result comparisons are unchanged, and no data divergence was observed.

Validation on an RTX 5880 Ada with Java 17, Python 3.10, and the Parquet cache serializer:

  • Original Spark 3.5.0 test: reproduced exactly 5 failures and 23 passes.

  • Fixed Spark 3.5.0 test: all 28 parameter combinations passed; CPU/GPU rows and schemas matched. All 10 supported AQE-off cases retained GPU cache scans.

  • Fixed Spark 3.5.3 test: all 28 parameter combinations passed; CPU/GPU rows and schemas matched. All 20 supported cases retained GPU cache scans across both AQE settings and input shapes.

  • A 224-combination comparison of the original and modified test's assertion selection changed only the intended Spark 3.5.0/3.5.1 AQE row-input path. Spark 3.5.1 and Databricks were not run locally.
  • AI assistance: The change and PR description were prepared with Codex assistance.

    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: 242 lines (+181 / -61) across 3 files Reviewer: thirtiseven Review duration: 357m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 242 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%
    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.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #17129"
    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: 38.8% (MEDIUM) · Higher = larger blast radius
    38.8%
    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: 16.8% · Safe to merge
    16.8%