Skip to main content

Executor

Struct Executor 

Source
pub struct Executor { /* private fields */ }
Expand description

Executes a physical operator tree and collects results.

Implementations§

Source§

impl Executor

Source

pub fn new() -> Self

Creates a new executor.

Source

pub fn with_columns(columns: Vec<String>) -> Self

Creates an executor with specified column names.

Source

pub fn with_columns_and_types( columns: Vec<String>, column_types: Vec<LogicalType>, ) -> Self

Creates an executor with specified column names and types.

Source

pub fn with_deadline(self, deadline: Option<Instant>) -> Self

Sets a wall-clock deadline for query execution.

Source

pub fn with_timeout_duration(self, timeout: Option<Duration>) -> Self

Sets the original timeout duration (used for error messages).

Source

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.

Source

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.

Source

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.

Source

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 execute
  • adaptive_context - Context with cardinality estimates from planning
  • config - Adaptive execution configuration
§Errors

Returns an error if operator execution fails.

Trait Implementations§

Source§

impl Default for Executor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.