File tree 1 file changed +19
-0
lines changed
datafusion/core/src/execution
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1023,6 +1023,9 @@ impl SessionStateBuilder {
1023
1023
///
1024
1024
/// See [`Self::with_default_features`] to install the default set of functions,
1025
1025
/// catalogs, etc.
1026
+ ///
1027
+ /// To create a `SessionStateBuilder` with default features such as functions,
1028
+ /// please see [`Self::new_with_default_features`].
1026
1029
pub fn new ( ) -> Self {
1027
1030
Self {
1028
1031
session_id : None ,
@@ -1144,6 +1147,22 @@ impl SessionStateBuilder {
1144
1147
self
1145
1148
}
1146
1149
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
+
1147
1166
/// Set the session id.
1148
1167
pub fn with_session_id ( mut self , session_id : String ) -> Self {
1149
1168
self . session_id = Some ( session_id) ;
You can’t perform that action at this time.
0 commit comments