pub struct Executor { /* private fields */ }Expand description
Executes a physical operator tree and collects results.
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn with_columns(columns: Vec<String>) -> Self
pub fn with_columns(columns: Vec<String>) -> Self
Creates an executor with specified column names.
Sourcepub fn with_columns_and_types(
columns: Vec<String>,
column_types: Vec<LogicalType>,
) -> Self
pub fn with_columns_and_types( columns: Vec<String>, column_types: Vec<LogicalType>, ) -> Self
Creates an executor with specified column names and types.
Sourcepub fn with_deadline(self, deadline: Option<Instant>) -> Self
pub fn with_deadline(self, deadline: Option<Instant>) -> Self
Sets a wall-clock deadline for query execution.
Sourcepub fn with_timeout_duration(self, timeout: Option<Duration>) -> Self
pub fn with_timeout_duration(self, timeout: Option<Duration>) -> Self
Sets the original timeout duration (used for error messages).
Sourcepub fn execute(&self, operator: &mut dyn Operator) -> Result<QueryResult>
pub fn execute(&self, operator: &mut dyn Operator) -> Result<QueryResult>
Executes a physical operator and collects all results.
§Errors
Returns an error if operator execution fails or the query timeout is exceeded.
Sourcepub fn execute_pipeline(
&self,
source: Box<dyn Operator>,
push_ops: Vec<Box<dyn PushOperator>>,
) -> Result<QueryResult>
pub fn execute_pipeline( &self, source: Box<dyn Operator>, push_ops: Vec<Box<dyn PushOperator>>, ) -> Result<QueryResult>
Executes a push-based pipeline.
The source operator is wrapped in OperatorSource, push operators form
the pipeline body, and a ChunkCollector gathers results.
§Panics
Panics if the internal sink downcast fails (should never happen since we
create the ChunkCollector ourselves).
§Errors
Returns an error if pipeline execution fails or the query timeout is exceeded.
Sourcepub fn execute_with_limit(
&self,
operator: &mut dyn Operator,
limit: usize,
) -> Result<QueryResult>
pub fn execute_with_limit( &self, operator: &mut dyn Operator, limit: usize, ) -> Result<QueryResult>
Executes and returns at most limit rows.
§Errors
Returns an error if operator execution fails or the query timeout is exceeded.
Sourcepub fn execute_adaptive(
&self,
operator: Box<dyn Operator>,
adaptive_context: Option<AdaptiveContext>,
config: &AdaptiveConfig,
) -> Result<(QueryResult, Option<AdaptiveSummary>)>
pub fn execute_adaptive( &self, operator: Box<dyn Operator>, adaptive_context: Option<AdaptiveContext>, config: &AdaptiveConfig, ) -> Result<(QueryResult, Option<AdaptiveSummary>)>
Executes a physical operator with adaptive cardinality tracking.
This wraps the operator in a cardinality tracking layer and monitors deviation from estimates during execution. The adaptive summary is returned alongside the query result.
§Arguments
operator- The root physical operator to executeadaptive_context- Context with cardinality estimates from planningconfig- Adaptive execution configuration
§Errors
Returns an error if operator execution fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Executor
impl RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl UnwindSafe for Executor
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
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