Skip to content

Conversation

@ulysses-you
Copy link
Contributor

What changes were proposed in this pull request?

This is a re-work pr for #34316. The reason before we can not safely cancel running stages is we use the stage status to track the final sql execution status, but it is not a issue any more since #38302.

Why are the changes needed?

We see stage was still running after AQE plan finished. This is because the plan which contains a join with one empty side has been converted to LocalTableScanExec during AQEOptimizer, but the other side of this join is still running (shuffle map stage).

It's no meaning to keep running that stage, so It's better to cancel the running stage when main query is going to final plan in case wasting the task resource.

Does this PR introduce any user-facing change?

maybe yes, the unnecessary running stage will be cancelled.

How was this patch tested?

add test

@github-actions github-actions bot added the SQL label Jun 9, 2023
@ulysses-you
Copy link
Contributor Author

closed as it would affect reuse exchange

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.

1 participant