File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
datafusion/core/src/execution Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1023,6 +1023,9 @@ impl SessionStateBuilder {
10231023 ///
10241024 /// See [`Self::with_default_features`] to install the default set of functions,
10251025 /// catalogs, etc.
1026+ ///
1027+ /// To create a `SessionStateBuilder` with default features such as functions,
1028+ /// please see [`Self::new_with_default_features`].
10261029 pub fn new ( ) -> Self {
10271030 Self {
10281031 session_id : None ,
@@ -1144,6 +1147,22 @@ impl SessionStateBuilder {
11441147 self
11451148 }
11461149
1150+ /// Returns a new [`SessionStateBuilder`] with default features.
1151+ ///
1152+ /// This is equivalent to calling [`Self::new()`] followed by [`Self::with_default_features()`].
1153+ ///
1154+ /// ```
1155+ /// use datafusion::execution::session_state::SessionStateBuilder;
1156+ ///
1157+ /// // Create a new SessionState with default features
1158+ /// let session_state = SessionStateBuilder::new_with_default_features()
1159+ /// .with_session_id("my_session".to_string())
1160+ /// .build();
1161+ /// ```
1162+ pub fn new_with_default_features ( ) -> Self {
1163+ Self :: new ( ) . with_default_features ( )
1164+ }
1165+
11471166 /// Set the session id.
11481167 pub fn with_session_id ( mut self , session_id : String ) -> Self {
11491168 self . session_id = Some ( session_id) ;
You can’t perform that action at this time.
0 commit comments