← Back to Pull requests

Remove GPU sort-merge join support [databricks] #17264

Open
unknown opened this pull request with 294 lines diff across 3 files
View on GitHub
unknown unknown commented on Dec 02, 2026 22:26 UTC
Author

Fixes #16066.

Description

cuDF’s HashCSR improvements largely eliminate the low-cardinality hash-join penalty that motivated GPU sort-merge join support. Remove the optional sort-merge execution paths, fallback handling, strategy configuration value, and dedicated CI pass.

spark.rapids.sql.join.strategy=INNER_SORT_WITH_POST is now an alias for INNER_HASH_WITH_POST to maintain backwards compatability.

Keep shared hash-join post-processing and build-side selection. Update the conditional outer-join regression tests to exercise INNER_HASH_WITH_POST.

Validation ran locally on an RTX A6000:

  • Spark 3.5.5 / Scala 2.12 build passed.

  • Spark 4.0.1 / Scala 2.13 build passed; runtime tests were not run for this profile.

  • HashBuildPlannerSuite and BroadcastHashJoinSuite: 32 passed.

  • Join integration tests: 132 passed, 12 expected skips for unsupported non-AST outer joins.

  • All three retained strategies passed CPU/GPU parity checks and 168 smoke queries; GPU execution and rejection of the removed configuration were verified.

  • Tracked-source Scalastyle checks and offline shim coverage across 34 profiles passed.
  • Online shim preflight and cross-PR advisory remain INCOMPLETE because authenticated GitHub CLI access was unavailable. Databricks runtime validation remains outstanding.

    Performance measurements used shuffled INT32 keys, 10,000 rows per side, and 10 distinct keys:

    | Measurement | Hash join | Sort-merge join |
    |---|---:|---:|
    | Native build and gather-map generation, median | 0.21 ms | 0.90 ms |
    | Spark joinTime metric, median | 3.69 ms | 9.28 ms |

    These measurements used a cuDF 27.02 snapshot. Sort-merge still won some synthetic forced-large-build and pre-sorted cases, but choosing the smaller hash build side reversed the forced-large-build advantage.

    AI assistance: Codex assisted with implementation, benchmarking, and validation.

    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: 294 lines (+220 / -74) across 3 files Reviewer: gerashegalov Review duration: 3550m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 294 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.340
    Real PR Conversation Timeline
    1 comments
    "Review active on #17264"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 39.9% (MEDIUM) · Higher = larger blast radius
    39.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 21.3% · Safe to merge
    21.3%