-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-22932] [SQL] Refactor AnalysisContext #20127
Conversation
Test build #85557 has finished for PR 20127 at commit
|
retest this please |
Test build #85562 has finished for PR 20127 at commit
|
retest this please |
Test build #85570 has finished for PR 20127 at commit
|
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.
I think AnalysisContext
is already per-query for now, because only withAnalysisContext
can change it.
Seems this just adds another safety guard.
} | ||
} | ||
|
||
private def executeSameContext(plan: LogicalPlan): LogicalPlan = super.execute(plan) |
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.
executeWithSameContext
?
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
@@ -70,6 +71,8 @@ object AnalysisContext { | |||
} | |||
|
|||
def get: AnalysisContext = value.get() | |||
def reset(): Unit = value.remove() |
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.
private
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.
Will be resolved by the future PR.
lgtm |
Thanks! Merged to master |
Hi, @gatorsmile . |
## What changes were proposed in this pull request? Add a `reset` function to ensure the state in `AnalysisContext ` is per-query. ## How was this patch tested? The existing test cases Author: gatorsmile <[email protected]> Closes #20127 from gatorsmile/refactorAnalysisContext.
Yeah, I manually merged it to 2.3 branch. |
What changes were proposed in this pull request?
Add a
reset
function to ensure the state inAnalysisContext
is per-query.How was this patch tested?
The existing test cases