Add AutoOptimizedShuffle regression coverage [databricks] - #15818
Open
gerashegalov wants to merge 2 commits into
Open
Add AutoOptimizedShuffle regression coverage [databricks] #15818gerashegalov wants to merge 2 commits into
gerashegalov wants to merge 2 commits into
Conversation
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
Collaborator
Author
|
build |
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
Collaborator
Author
|
build |
gerashegalov
marked this pull request as ready for review
August 31, 2026 18:24
Contributor
Greptile SummaryThis PR adds focused DBR 17.3+ regression coverage for AutoOptimizedShuffle and extends the CPU/GPU collection helper with an optional CPU executed-plan assertion.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or test-harness issue identified. The new callback executes after the CPU query has been collected and before GPU-session configuration is applied, while the regression test explicitly verifies both GPU execution and consistent optimized partitioning. Important Files Changed
Sequence DiagramsequenceDiagram
participant Test
participant CPU as CPU Spark session
participant GPU as GPU Spark session
Test->>CPU: Run grouped shuffle and collect
CPU-->>Test: Results and final adaptive plan
Test->>Test: Capture optimized CPU partition count
Test->>GPU: Run same grouped shuffle and collect
GPU-->>Test: Results and final adaptive plan
Test->>Test: Require GpuShuffleExchangeExec
Test->>Test: Compare partitioning counts and results
Reviews (1): Last reviewed commit: "Strengthen AutoOptimizedShuffle regressi..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13930.
Description
Databricks AQE's AutoOptimizedShuffle visits shuffle exchanges to determine and update their target partitioning. The DBR 17.3 GPU shuffle exchange now implements that contract, but there was no focused regression test ensuring the Databricks optimizer can inspect a GPU exchange without throwing
UnsupportedOperationException.This change adds
test_databricks_auto_optimized_shuffleto the AQE integration suite. The test runs only on DBR 17.3 or later, explicitly enables AutoOptimizedShuffle, forces a grouped shuffle with multiple input partitions, compares CPU and GPU results, and requiresGpuShuffleExchangeExecin the executed GPU plan so CPU fallback cannot hide the regression.The test also disables ordinary AQE post-shuffle coalescing and inspects the final adaptive CPU and GPU plans. It uses the CPU AutoOptimizedShuffle partition count as the runtime oracle, then verifies that the GPU exchange's target, advertised output, GPU partitioning, and shuffle dependency all agree with that count.
Validation performed locally:
git diff --checkaqe_test.pyandasserts.pyThe strengthened Spark-backed assertions were not run locally because AutoOptimizedShuffle is proprietary Databricks behavior and requires a DBR 17.3 GPU cluster with a DBR-built RAPIDS plugin JAR.
AI assistance: The test change and this pull request description were prepared with OpenAI Codex and reviewed by the contributor before opening the pull request.
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance