-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-29906][SQL][FOLLOWUP] Update the final plan in UI for AQE #26968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #115624 has finished for PR 26968 at commit
|
|
LGTM. Thanks |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Merged to master.
|
@cloud-fan Is there any UT to catch such mistake that it won't happen again ? |
|
unfortunately we don't have a good test framework for UI. It would be great if we have one. |
|
|
||
| // Run the final plan when there's no more unfinished stages. | ||
| currentPhysicalPlan = applyPhysicalRules(result.newPlan, queryStageOptimizerRules) | ||
| executionId.foreach(onUpdatePlan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the plan sent out before isFinalPlan = true ? Isn't it the final plan ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter. onUpdatePlan only look at currentPhysicalPlan, so we must call onUpdatePlan after setting currentPhysicalPlan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter for what's displayed on UI or anyone interested in sql update event ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean? Even if you move isFinalPlan = true before this line, nothing gets changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The root nodes of Physical Plan in physicalPlanDescriptions are different: AdaptiveSparkPlan(isFinalPlan=true) vs AdaptiveSparkPlan(isFinalPlan=false). So are root nodes of sparkPlan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good catch! somehow I misread the code and thought it doesn't matter.
For UI it doesn't matter as we will strip the AdaptiveSparkPlanExec, but if there is a spark listener catching this event, it matters.
Can you send a PR to fix it? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Thanks for your reply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've sent #26983. Please review.
What changes were proposed in this pull request?
a followup of #26576, which mistakenly removes the UI update of the final plan.
Why are the changes needed?
fix mistake.
Does this PR introduce any user-facing change?
no
How was this patch tested?
existing tests