Return a new [`SessionState`] suitable for executing a single query. Notes: 1. `query_execution_start_time` is set to the current time for the returned state. 2. The returned state is not shared with the current session state and this changes to the returned `SessionState` such as changing [`ConfigOptions`] will not be reflected in this `SessionContext`. [`ConfigOptions`]: crate::config::Conf
(&self)
| 2025 | /// |
| 2026 | /// [`ConfigOptions`]: crate::config::ConfigOptions |
| 2027 | pub fn state(&self) -> SessionState { |
| 2028 | let mut state = self.state.read().clone(); |
| 2029 | state.mark_start_execution(); |
| 2030 | state |
| 2031 | } |
| 2032 | |
| 2033 | /// Get reference to [`SessionState`] |
| 2034 | pub fn state_ref(&self) -> Arc<RwLock<SessionState>> { |