[SPARK-55877][UI] Side-by-side Initial vs Final plan comparison for AQE queries#54806
Closed
yaooqinn wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-55877][UI] Side-by-side Initial vs Final plan comparison for AQE queries#54806yaooqinn wants to merge 1 commit intoapache:masterfrom
yaooqinn wants to merge 1 commit intoapache:masterfrom
Conversation
…QE queries Parse the physicalPlanDescription text to extract 'Initial Plan' and 'Final Plan' sections when AQE rewrites the plan. Display them with a Unified/Split toggle button group: - Unified (default): full plan text as before - Split: two columns showing Initial Plan (left) vs Final Plan (right) For non-AQE queries (where initial == final), the raw text is shown directly without the toggle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
dongjoon-hyun
approved these changes
Mar 16, 2026
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM. Thank you, @yaooqinn .
Member
|
Merged to master. |
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.


What changes were proposed in this pull request?
Add a side-by-side comparison view for AQE plan evolution on the SQL execution detail page.
When AQE rewrites a query plan, the Plan Details section now shows a Unified | Split toggle:
For non-AQE queries (where initial == final), the raw text is shown directly without the toggle.
Why are the changes needed?
Understanding how AQE rewrites a plan is important for query performance analysis. Currently the plan text mixes both versions in a single block, making it hard to compare. The split view makes differences immediately visible (e.g., added ShuffleQueryStage, AQEShuffleRead coalescing, statistics).
Does this PR introduce any user-facing change?
Yes — Plan Details section on the SQL execution page now shows a Unified/Split toggle when AQE has rewritten the plan.
How was this patch tested?
Compilation verified. Manual testing with AQE-enabled queries.
Was this patch authored or co-authored using generative AI tooling?
Yes, co-authored with GitHub Copilot.