From 49fd531621b8dae57825bba688c6bd884ff772ab Mon Sep 17 00:00:00 2001 From: yangzhong Date: Tue, 17 Jan 2023 14:26:18 +0800 Subject: [PATCH] Make it able to specify a session id for SessionState --- datafusion/core/src/execution/context.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/datafusion/core/src/execution/context.rs b/datafusion/core/src/execution/context.rs index 98fe6ff79758..a3e453a2a502 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,