mcdull-zhang opened a new pull request, #36966: URL: https://github.com/apache/spark/pull/36966
### What changes were proposed in this pull request? This unit test sometimes fails to run. for example, https://github.com/apache/spark/pull/35715#discussion_r892247619 When the left side is completed first, and then the right side is completed, since it is known that there are many empty partitions on the left side, the broadcast on the right side is demoted. However, if the right side is completed first and the left side is still being executed, the right side does not know whether there are many empty partitions on the left side, so there is no demote, and then the right side is broadcast in the planning stage. This PR does this: When it is found that the other side is QueryStage, if the QueryStage has not been materialized, demote it first. When the other side is completed, judge again whether demote is needed. ### Why are the changes needed? Fix small problems in logic ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? manual testing -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
