Skip to content

Conversation

@manuzhang
Copy link
Member

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 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.

Before

image

After

image

Does this PR introduce any user-facing change?

No

How was this patch tested?

Add UT.

@manuzhang manuzhang force-pushed the aqe-ui branch 3 times, most recently from 1bd68c3 to edc40ea Compare May 7, 2020 11:35
Copy link
Contributor

@cloud-fan cloud-fan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@cloud-fan
Copy link
Contributor

ok to test

@cloud-fan
Copy link
Contributor

cc @maryannxue @JkSelf

context.session.sparkContext.listenerBus.post(SparkListenerSQLAdaptiveSQLMetricUpdates(
executionId.toLong, newMetrics))
} else {
val queryExecution = SQLExecution.getQueryExecution(executionId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use context.qe instead??

@SparkQA
Copy link

SparkQA commented May 7, 2020

Test build #122405 has finished for PR 28474 at commit 9d539e0.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@manuzhang
Copy link
Member Author

@cloud-fan @maryannxue updated. Please review again.

Copy link
Contributor

@maryannxue maryannxue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@SparkQA
Copy link

SparkQA commented May 8, 2020

Test build #122422 has finished for PR 28474 at commit 86fc020.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

context.session.sparkContext.listenerBus.post(SparkListenerSQLAdaptiveSQLMetricUpdates(
executionId.toLong, newMetrics))
} else {
val queryExecution = context.qe
Copy link
Contributor

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.

@SparkQA
Copy link

SparkQA commented May 8, 2020

Test build #122427 has finished for PR 28474 at commit 78045ee.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@Ngone51
Copy link
Member

Ngone51 commented May 8, 2020

retest this please

@SparkQA
Copy link

SparkQA commented May 8, 2020

Test build #122432 has finished for PR 28474 at commit 78045ee.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan cloud-fan changed the title [SPARK-31658] Fix SQL UI not showing write commands of AQE plan [SPARK-31658][SQL] Fix SQL UI not showing write commands of AQE plan May 8, 2020
@SparkQA
Copy link

SparkQA commented May 8, 2020

Test build #122439 has finished for PR 28474 at commit 2726f3d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 8, 2020

Test build #122442 has finished for PR 28474 at commit 4409abd.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile gatorsmile closed this in 77c690a May 8, 2020
@gatorsmile
Copy link
Member

Thanks! Merged to master/3.0

gatorsmile added a commit that referenced this pull request May 8, 2020
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.

![image](https://user-images.githubusercontent.com/1191767/81288918-1893f580-9098-11ea-9771-e3d0820ba806.png)

![image](https://user-images.githubusercontent.com/1191767/81289008-3a8d7800-9098-11ea-93ec-516bbaf25d2d.png)

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]>
@SparkQA
Copy link

SparkQA commented May 8, 2020

Test build #122443 has finished for PR 28474 at commit 9111ceb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants