-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-49460][SQL] Remove cleanupResource() from EmptyRelationExec
#47931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/EmptyRelationExec.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
Outdated
Show resolved
Hide resolved
|
@LuciferYang Thank you for the review! updated |
|
I would like to hold on this PR a bit, want to dig more into when |
|
After revisiting
After all, So I'm removing |
|
Could you update the title and description of the PR to make them more aligned with the current modifications? |
cleanupResource() from EmptyRelationExec
|
@LuciferYang Updated. Could you pls help merge this PR? Thanks! |
LuciferYang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM
|
Merged into master. Thanks @liuzqt |
|
@liuzqt I would like to confirm, does this issue really exist in 3.5.x? It seems that |
|
@LuciferYang sorry my bad, it doesn't exist in 3.5, so merging into master should be enough. I also updated the Jira ticket. Thank you for the reivew! |
Thanks for your confirmation |
### What changes were proposed in this pull request? Fixed potential NPE risk in `EmptyRelationExec.logical` ### Why are the changes needed? This is a follow up for #47931, I've checked other callsites of `EmptyRelationExec.logical`, which we can not assure it's driver-only. So we should fix those potential risks. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? Existing UT ### Was this patch authored or co-authored using generative AI tooling? NO Closes #48191 from liuzqt/SPARK-49460. Authored-by: Ziqi Liu <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
Remove cleanupResource() from
EmptyRelationExecWhy are the changes needed?
This bug was introduced in #46830 :
cleanupResourcesmight be executed on the executor wherelogicalis null.After revisiting cleanupResources relevant code paths, I think
EmptyRelationExecdoesn't need to anything here.After all,
EmptyRelationExecis only a never-execute wrapper for materialized physical query stages, it should not be responsible for any cleanup invocation.So I'm removing
cleanupResourcesimplementation fromEmptyRelationExec.Does this PR introduce any user-facing change?
NO
How was this patch tested?
New unit test.
Was this patch authored or co-authored using generative AI tooling?
NO