pub struct ExecutionContext<'p> {
pub processor: &'p QueryProcessor,
pub function_registry: Option<Arc<Mutex<FunctionRegistry>>>,
pub table_catalog: Option<Arc<TableCatalog>>,
pub vfs: Option<Arc<VirtualFileSystemRegistry>>,
pub standalone_call_handler: Option<Arc<dyn StandaloneCallHandler>>,
pub sequence_fn: Option<SequenceFn>,
pub subquery_fn: Option<SubqueryFn>,
pub schema_ddl_fn: Option<SchemaDdlFn>,
pub snapshot_ts: Option<u64>,
pub commit_history: Vec<(u64, u64)>,
pub written_rows: Vec<(u64, u64)>,
pub txn_id: Option<u64>,
}Expand description
Shared state threaded through the mapper functions
Fields§
§processor: &'p QueryProcessor§function_registry: Option<Arc<Mutex<FunctionRegistry>>>§table_catalog: Option<Arc<TableCatalog>>§vfs: Option<Arc<VirtualFileSystemRegistry>>§standalone_call_handler: Option<Arc<dyn StandaloneCallHandler>>§sequence_fn: Option<SequenceFn>§subquery_fn: Option<SubqueryFn>§schema_ddl_fn: Option<SchemaDdlFn>§snapshot_ts: Option<u64>MVCC snapshot timestamp. When Some(ts), reads are isolated to data
committed at or before ts. None means read最新 (no isolation).
commit_history: Vec<(u64, u64)>Commit history for MVCC visibility checks: (txn_id, commit_ts) pairs.
written_rows: Vec<(u64, u64)>Row-level write set for OCC conflict detection.
Populated by the mapper after each write operation (SET, DELETE, INSERT).
The connection layer reads this after execution and calls record_write().
txn_id: Option<u64>Active transaction id threaded into write operators so inserts/deletes use MVCC-aware storage variants (P52.18).
Implementations§
Source§impl<'p> ExecutionContext<'p>
impl<'p> ExecutionContext<'p>
pub fn execute_children( &mut self, operators: &[LogicalOperator], ) -> Result<Vec<DataChunk>, ProcessorError>
Sourcepub fn resolve_scan_data<'b>(
&self,
table_name: &str,
predicate: Option<(usize, &'b str, &'b Value)>,
) -> (Option<Vec<Vec<Value>>>, Vec<ColumnDefinition>, u64)
pub fn resolve_scan_data<'b>( &self, table_name: &str, predicate: Option<(usize, &'b str, &'b Value)>, ) -> (Option<Vec<Vec<Value>>>, Vec<ColumnDefinition>, u64)
Resolve table data and column definitions for a scan node.
When snapshot_ts is set on the context, uses MVCC-aware scan.
Sourcepub fn resolve_scan_arrow_data(
&self,
table_name: &str,
) -> (Option<Vec<ArrayRef>>, Vec<ColumnDefinition>, u64)
pub fn resolve_scan_arrow_data( &self, table_name: &str, ) -> (Option<Vec<ArrayRef>>, Vec<ColumnDefinition>, u64)
Resolve scan data directly into Arrow arrays, bypassing the
Vec<Vec<Value>> intermediate materialization.
Reads from NodeTable’s NodeGroup column chunks, converts each ColumnChunk to an Arrow array, then concatenates per-group arrays into one array per column.
When snapshot_ts is set, falls back to the Vec<Vec
Auto Trait Implementations§
impl<'p> !RefUnwindSafe for ExecutionContext<'p>
impl<'p> !UnwindSafe for ExecutionContext<'p>
impl<'p> Freeze for ExecutionContext<'p>
impl<'p> Send for ExecutionContext<'p>
impl<'p> Sync for ExecutionContext<'p>
impl<'p> Unpin for ExecutionContext<'p>
impl<'p> UnsafeUnpin for ExecutionContext<'p>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more