Skip to content

Apache DataFusion SQL Query Engine

Make it able to specify a session id for SessionState (#4933)

yahoNanJing4e08117b1d3a
diff --git a/datafusion/core/src/execution/context.rs b/datafusion/core/src/execution/context.rs
index 98fe6ff797..a3e453a2a5 100644
--- a/datafusion/core/src/execution/context.rs
+++ b/datafusion/core/src/execution/context.rs
@@ -1585,6 +1585,12 @@ impl SessionState {
})
}
+ /// Replace the random session id.
+ pub fn with_session_id(mut self, session_id: String) -> Self {
+ self.session_id = session_id;
+ self
+ }
+
/// Replace the default query planner
pub fn with_query_planner(
mut self,