pub struct QueryProcessor { /* private fields */ }Expand description
The query processor executes a physical plan and produces result chunks.
Implementations§
Source§impl QueryProcessor
impl QueryProcessor
pub fn new() -> Self
Sourcepub fn with_registry(registry: Arc<Mutex<FunctionRegistry>>) -> Self
pub fn with_registry(registry: Arc<Mutex<FunctionRegistry>>) -> Self
Create a processor with access to the function registry.
Sourcepub fn with_catalog(
registry: Arc<Mutex<FunctionRegistry>>,
table_catalog: Arc<TableCatalog>,
vfs: Arc<VirtualFileSystemRegistry>,
) -> Self
pub fn with_catalog( registry: Arc<Mutex<FunctionRegistry>>, table_catalog: Arc<TableCatalog>, vfs: Arc<VirtualFileSystemRegistry>, ) -> Self
Create a processor with function registry, table catalog access, and VFS.
Sourcepub fn with_standalone_call_handler(
self,
handler: Arc<dyn StandaloneCallHandler>,
) -> Self
pub fn with_standalone_call_handler( self, handler: Arc<dyn StandaloneCallHandler>, ) -> Self
Set the sequence operation callback (for nextval/currval).
pub fn with_sequence_fn(self, f: SequenceFn) -> Self
Sourcepub fn with_subquery_fn(self, f: SubqueryFn) -> Self
pub fn with_subquery_fn(self, f: SubqueryFn) -> Self
Set the subquery operation callback.
Sourcepub fn with_schema_ddl_fn(self, f: SchemaDdlFn) -> Self
pub fn with_schema_ddl_fn(self, f: SchemaDdlFn) -> Self
Set the schema DDL callback (for CREATE/DROP SEQUENCE, EXPORT/IMPORT DATABASE).
Sourcepub fn with_snapshot(
self,
snapshot_ts: Option<u64>,
commit_history: Vec<(u64, u64)>,
) -> Self
pub fn with_snapshot( self, snapshot_ts: Option<u64>, commit_history: Vec<(u64, u64)>, ) -> Self
Set MVCC snapshot parameters for read isolation.
Sourcepub fn execute(
&self,
operators: &[LogicalOperator],
) -> Result<Vec<DataChunk>, ProcessorError>
pub fn execute( &self, operators: &[LogicalOperator], ) -> Result<Vec<DataChunk>, ProcessorError>
Execute a sequence of logical operators by mapping them to physical operators.
pub fn execute_internal( &self, operators: &[LogicalOperator], ) -> Result<Vec<DataChunk>, ProcessorError>
Sourcepub fn take_written_rows(&self) -> Vec<(u64, u64)>
pub fn take_written_rows(&self) -> Vec<(u64, u64)>
Take the accumulated write set from the processor. Returns all (table_id, row_id) pairs written during the last execution.
Sourcepub fn evaluate_expression(
_expr: &Expression,
_chunk: &DataChunk,
) -> Result<ValueVector, ProcessorError>
pub fn evaluate_expression( _expr: &Expression, _chunk: &DataChunk, ) -> Result<ValueVector, ProcessorError>
Execute a single expression against a DataChunk and return a ValueVector of results.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for QueryProcessor
impl !RefUnwindSafe for QueryProcessor
impl !UnwindSafe for QueryProcessor
impl Send for QueryProcessor
impl Sync for QueryProcessor
impl Unpin for QueryProcessor
impl UnsafeUnpin for QueryProcessor
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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