-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-31658][SQL] Fix SQL UI not showing write commands of AQE plan #28474
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
1bd68c3 to
edc40ea
Compare
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
Show resolved
Hide resolved
cloud-fan
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.
good catch!
|
ok to test |
| context.session.sparkContext.listenerBus.post(SparkListenerSQLAdaptiveSQLMetricUpdates( | ||
| executionId.toLong, newMetrics)) | ||
| } else { | ||
| val queryExecution = SQLExecution.getQueryExecution(executionId) |
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.
Use context.qe instead??
|
Test build #122405 has finished for PR 28474 at commit
|
|
@cloud-fan @maryannxue updated. Please review again. |
maryannxue
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.
LGTM.
|
Test build #122422 has finished for PR 28474 at commit
|
| context.session.sparkContext.listenerBus.post(SparkListenerSQLAdaptiveSQLMetricUpdates( | ||
| executionId.toLong, newMetrics)) | ||
| } else { | ||
| val queryExecution = context.qe |
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.
note: queryExecution is longer than context.qe, we can just inline it.
|
Test build #122427 has finished for PR 28474 at commit
|
|
retest this please |
|
Test build #122432 has finished for PR 28474 at commit
|
|
Test build #122439 has finished for PR 28474 at commit
|
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
Outdated
Show resolved
Hide resolved
|
Test build #122442 has finished for PR 28474 at commit
|
|
Thanks! Merged to master/3.0 |
Show write commands on SQL UI of an AQE plan Currently the leaf node of an AQE plan is always a `AdaptiveSparkPlan` which is not true when it's a child of a write command. Hence, the node of the write command as well as its metrics are not shown on the SQL UI.   No Add UT. Closes #28474 from manuzhang/aqe-ui. Lead-authored-by: manuzhang <[email protected]> Co-authored-by: Xiao Li <[email protected]> Signed-off-by: gatorsmile <[email protected]> (cherry picked from commit 77c690a) Signed-off-by: gatorsmile <[email protected]>
|
Test build #122443 has finished for PR 28474 at commit
|
What changes were proposed in this pull request?
Show write commands on SQL UI of an AQE plan
Why are the changes needed?
Currently the leaf node of an AQE plan is always a
AdaptiveSparkPlanwhich is not true when it's a child of a write command. Hence, the node of the write command as well as its metrics are not shown on the SQL UI.Before
After
Does this PR introduce any user-facing change?
No
How was this patch tested?
Add UT.