pub struct AdaptivePipelineExecutor { /* private fields */ }Expand description
High-level adaptive pipeline that executes a pull-based operator with cardinality tracking using push-based infrastructure.
This bridges the pull-based planner output with push-based execution:
- Wraps the pull operator as an
OperatorSource - Uses
CardinalityTrackingSinkto track output cardinality - Provides adaptive feedback through
AdaptiveContext
§Example
ⓘ
use grafeo_core::execution::adaptive::AdaptivePipelineExecutor;
let executor = AdaptivePipelineExecutor::new(operator, adaptive_context);
let (chunks, summary) = executor.execute()?;Implementations§
Source§impl AdaptivePipelineExecutor
impl AdaptivePipelineExecutor
Sourcepub fn new(operator: Box<dyn Operator>, context: AdaptiveContext) -> Self
pub fn new(operator: Box<dyn Operator>, context: AdaptiveContext) -> Self
Creates a new adaptive pipeline executor.
§Arguments
operator- The pull-based operator to executecontext- Adaptive context with cardinality estimates
Sourcepub fn with_config(
operator: Box<dyn Operator>,
context: AdaptiveContext,
config: AdaptivePipelineConfig,
) -> Self
pub fn with_config( operator: Box<dyn Operator>, context: AdaptiveContext, config: AdaptivePipelineConfig, ) -> Self
Creates an executor with custom configuration.
Sourcepub fn execute(self) -> Result<(Vec<DataChunk>, AdaptiveSummary), OperatorError>
pub fn execute(self) -> Result<(Vec<DataChunk>, AdaptiveSummary), OperatorError>
Sourcepub fn execute_collecting(
self,
) -> Result<(Vec<DataChunk>, AdaptiveSummary), OperatorError>
pub fn execute_collecting( self, ) -> Result<(Vec<DataChunk>, AdaptiveSummary), OperatorError>
Executes and collects all results into DataChunks.
This is a simpler interface that handles chunk collection internally.
Sourcepub fn context(&self) -> &SharedAdaptiveContext
pub fn context(&self) -> &SharedAdaptiveContext
Returns a reference to the shared context for external monitoring.
Auto Trait Implementations§
impl Freeze for AdaptivePipelineExecutor
impl !RefUnwindSafe for AdaptivePipelineExecutor
impl Send for AdaptivePipelineExecutor
impl Sync for AdaptivePipelineExecutor
impl Unpin for AdaptivePipelineExecutor
impl !UnwindSafe for AdaptivePipelineExecutor
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