-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Pass SessionState to TableProvider::scan #2660
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
Pass SessionState to TableProvider::scan #2660
Conversation
b757bb7 to
3290e26
Compare
| Arc::new(TaskContext::from(self)) | ||
| } | ||
|
|
||
| /// Get a copy of the [`SessionState`] of this [`SessionContext`] |
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'm not a massive fan of this, but it appears to be what we do already for every query and when constructing a TaskContext, so it can't be that bad..........
3290e26 to
4ae3b42
Compare
|
Will fix ballista after apache/datafusion-ballista#48 and apache/datafusion-ballista#49 |
alamb
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.
cc @andygrove as I believe he is working on disconnecting the logical and physical plans in DataFusion and I want to make sure this doesn't mess up his plans
Otherwise looks good to me though
|
My understanding is that #2569 removed the dependency of LogicalPlan on TableProvider |
Which issue does this PR close?
Closes #2658
Closes #2657
Rationale for this change
Prevents circular references, and will also allow TableProviders access to things like the RuntimeEnv, etc...
What changes are included in this PR?
Passes a
&SessionStatetoTableProvider::scan, this is necessary forTableProviderto be able to access plan state without potentially introducing circular references.Are there any user-facing changes?
Yes, this changes the signature of TableProvider::scan
Does this PR break compatibility with Ballista?
Possibly