Skip to content

[SPARK-31650][SQL] Fix wrong UI in case of AdaptiveSparkPlanExec has unmanaged subqueries#28460

Closed
Ngone51 wants to merge 2 commits intoapache:masterfrom
Ngone51:fix_aqe_ui
Closed

[SPARK-31650][SQL] Fix wrong UI in case of AdaptiveSparkPlanExec has unmanaged subqueries#28460
Ngone51 wants to merge 2 commits intoapache:masterfrom
Ngone51:fix_aqe_ui

Conversation

@Ngone51
Copy link
Member

@Ngone51 Ngone51 commented May 6, 2020

What changes were proposed in this pull request?

Make the non-subquery AdaptiveSparkPlanExec update UI again after execute/executeCollect/executeTake/executeTail if the AdaptiveSparkPlanExec has subqueries which do not belong to any query stages.

Why are the changes needed?

If there're subqueries do not belong to any query stages of the main query, the main query could get final physical plan and update UI before those subqueries finished. As a result, the UI can not reflect the change from the subqueries, e.g. new nodes generated from subqueries.

Before:

before_aqe_ui

After:
after_aqe_ui

Does this PR introduce any user-facing change?

No(AQE feature hasn't been released).

How was this patch tested?

Tested manually.

@Ngone51
Copy link
Member Author

Ngone51 commented May 6, 2020

cc @cloud-fan @maryannxue

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!

@SparkQA
Copy link

SparkQA commented May 6, 2020

Test build #122350 has finished for PR 28460 at commit 5e69f87.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master/3.0!

@cloud-fan cloud-fan closed this in b16ea8e May 6, 2020
cloud-fan pushed a commit that referenced this pull request May 6, 2020
…unmanaged subqueries

### What changes were proposed in this pull request?

Make the non-subquery `AdaptiveSparkPlanExec` update UI again after execute/executeCollect/executeTake/executeTail if the `AdaptiveSparkPlanExec` has subqueries which do not belong to any query stages.

### Why are the changes needed?

If there're subqueries do not belong to any query stages of the main query, the main query could get final physical plan and update UI before those subqueries finished. As a result, the UI can not reflect the change from the subqueries, e.g. new nodes generated from subqueries.

Before:

<img width="335" alt="before_aqe_ui" src="https://user-images.githubusercontent.com/16397174/81149758-671a9480-8fb1-11ea-84c4-9a4520e2b08e.png">

After:
<img width="546" alt="after_aqe_ui" src="https://user-images.githubusercontent.com/16397174/81149752-63870d80-8fb1-11ea-9852-f41e11afe216.png">

### Does this PR introduce _any_ user-facing change?

No(AQE feature hasn't been released).

### How was this patch tested?

Tested manually.

Closes #28460 from Ngone51/fix_aqe_ui.

Authored-by: yi.wu <yi.wu@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit b16ea8e)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@Ngone51
Copy link
Member Author

Ngone51 commented May 7, 2020

thanks!

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.

3 participants

Comments