-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11700] [SQL] Remove thread local SQLContext in SparkPlan #9990
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
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.
super nit: import order
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.
How to define this order in Intelij?
|
LGTM |
|
Test build #46748 has finished for PR 9990 at commit
|
|
There are other places need to be fixed. |
|
Can you update the pull request title to say more? "use weak reference to avoid memory leak" is a bit too generic. The original jira title is ok, or a better one is to mention SQLContext. |
|
@zsxwing The one in SQLContext have a |
Sorry. I meant the compilation failed. |
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.
A WeakReference is quite weak; you'll lose the reference on a full GC. Is this not going to cause the code to fail suddenly? I don't know that references are any remedy for a leak.
|
Test build #46789 has finished for PR 9990 at commit
|
|
LGTM |
In 1.6, we introduce a public API to have a SQLContext for current thread, SparkPlan should use that.