Skip to content
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: improve documentation on SessionState #11642

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jul 24, 2024

Which issue does this PR close?

N/A

Rationale for this change

While working on trying to add some doc suggestions to #11516 (which is basically making a trait for SessionState), I reviewed the SessionState documentation and found some thing I would like to clarify

What changes are included in this PR?

  1. Update docs
  2. Add an example of creating SessionState from SessionContext

Are these changes tested?

yes, by doc test in CI

Are there any user-facing changes?

Only documentation, no user facing changes

@github-actions github-actions bot added the core Core DataFusion crate label Jul 24, 2024
/// See [`SessionContext`] for a higher level API.
/// `SessionState` contains all the necessary state to plan and execute queries,
/// such as configuration, functions, and runtime environment. Please see the
/// documentation on [`SessionContext`] for more information.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make it clear that SessionContext not only has a higher level API it also has a good description of the differences between the structures:

https://docs.rs/datafusion/latest/datafusion/execution/context/struct.SessionContext.html#sessioncontext-sessionstate-and-taskcontext

@alamb alamb marked this pull request as ready for review July 24, 2024 20:31
@alamb alamb changed the title Minor: improve documentation on SessionState Minor: improve documentation on SessionState Jul 24, 2024
Copy link
Member

@jonahgao jonahgao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me👍

@comphead comphead merged commit a721be1 into apache:main Jul 27, 2024
25 checks passed
@alamb alamb deleted the alamb/session_state_docs branch July 28, 2024 10:37
@alamb
Copy link
Contributor Author

alamb commented Jul 28, 2024

Thanks @jonahgao and @findepi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants