Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
ulysses-you committed Mar 10, 2023
commit 295e47eb8fb294a64f5c138ec2d546f2db3e4d5b
Original file line number Diff line number Diff line change
Expand Up @@ -226,22 +226,8 @@ case class AdaptiveSparkPlanExec(
}

private lazy val shouldUpdatePlan: Boolean = {
// If the `QueryExecution` does not match the current execution ID, it means the execution ID
// belongs to another (parent) query, and we should call update metrics instead of plan in
// this query. For example:
//
// ...
// |
// AdaptiveSparkPlanExec (query execution 0, no execution id)
// |
// InMemoryTableScanExec
// |
// ...
// |
// AdaptiveSparkPlanExec (query execution 1, execution id 0)
//
// We can not update plan for query execution 0 which may overwrite the whole query plan.
// Instead, we should update SQL metrics.
// Only the root `AdaptiveSparkPlanExec` of the main query that triggers this query execution
// should update UI.
Copy link
Contributor

@cloud-fan cloud-fan Mar 10, 2023

Choose a reason for hiding this comment

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

Suggested change
// should update UI.
// need to do a final plan update for the UI.

!isSubquery && getExecutionId.exists(SQLExecution.getQueryExecution(_) eq context.qe)
}

Expand Down