Skip to content

Apache DataFusion SQL Query Engine

Improve `SessionStateBuilder::new` documentation (#14980)

Andrew Lamb2fcab2ef0da4
diff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rs
index ad2b69f25a..2bbf3ca456 100644
--- a/datafusion/core/src/execution/session_state.rs
+++ b/datafusion/core/src/execution/session_state.rs
@@ -1012,7 +1012,10 @@ pub struct SessionStateBuilder {
}
impl SessionStateBuilder {
- /// Returns a new [`SessionStateBuilder`] with no options set.
+ /// Returns a new empty [`SessionStateBuilder`].
+ ///
+ /// See [`Self::with_default_features`] to install the default set of functions,
+ /// catalogs, etc.
pub fn new() -> Self {
Self {
session_id: None,
@@ -1042,9 +1045,10 @@ impl SessionStateBuilder {
}
}
- /// Returns a new [SessionStateBuilder] based on an existing [SessionState]
+ /// Returns a new [SessionStateBuilder] based on an existing [SessionState].
+ ///
/// The session id for the new builder will be unset; all other fields will
- /// be cloned from what is set in the provided session state. If the default
+ /// be cloned from `existing`. If the default
/// catalog exists in existing session state, the new session state will not
/// create default catalog and schema.
pub fn new_from_existing(existing: SessionState) -> Self {