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 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_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
Mutably borrows from an owned value. Read more
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