-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Minor: Add example for configuring SessionContext #12139
Conversation
@@ -19,6 +19,8 @@ | |||
|
|||
pub mod context; | |||
pub mod session_state; | |||
pub use session_state::{SessionState, SessionStateBuilder}; |
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.
this makes it possible to do
use datafusion::execution::SessionStateBuilder;
@@ -1427,6 +1461,12 @@ impl From<&SessionContext> for TaskContext { | |||
} | |||
} | |||
|
|||
impl From<SessionState> for 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.
This makes it possible to do
let ctx = SessionContext::from(state);
lgtm, thanks for adding this |
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.
👍 thanks @alamb
Which issue does this PR close?
N/A
Rationale for this change
While working on the reprpoducer for #12136 I knew there was a nice builder API added by @Omega359 in #11403 but I couldn't find it quickly in the docs
What changes are included in this PR?
pub use
forSessionStateBuilder
From
impl for SessionState to make the example nicerAre these changes tested?
yes, by doc CI
Are there any user-facing changes?
Yes, the changes are user facing
here is what the new docs look like