MCPcopy Create free account
hub / github.com/apache/datafusion / state

Method state

datafusion/core/src/execution/context/mod.rs:2027–2031  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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>> {

Calls 3

readMethod · 0.80
cloneMethod · 0.45
mark_start_executionMethod · 0.45