Skip to main content

BatchingExecution

Trait BatchingExecution 

Source
pub trait BatchingExecution:
    Send
    + Sync
    + 'static {
    // Required method
    fn execute_once<'life0, 'life1, 'life2, 'async_trait>(
        self: Arc<Self>,
        guard: BatchingExecutionGuard,
        task: &'life0 BatchingTask,
        engine: &'life1 QueryEngineRef,
        frontend: &'life2 Arc<FrontendClient>,
        max_window_cnt: Option<usize>,
    ) -> Pin<Box<dyn Future<Output = ExecuteOnceOutcome> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn rewrite_plan(
        &self,
        _task: &BatchingTask,
        plan: LogicalPlan,
    ) -> Result<LogicalPlan> { ... }
    fn stop(&self) { ... }
}

Required Methods§

Source

fn execute_once<'life0, 'life1, 'life2, 'async_trait>( self: Arc<Self>, guard: BatchingExecutionGuard, task: &'life0 BatchingTask, engine: &'life1 QueryEngineRef, frontend: &'life2 Arc<FrontendClient>, max_window_cnt: Option<usize>, ) -> Pin<Box<dyn Future<Output = ExecuteOnceOutcome> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute one round while retaining the guard through all task-state updates. An implementation that continues after caller cancellation must retain the guard with that work and make it stoppable through Self::stop.

Provided Methods§

Source

fn rewrite_plan( &self, _task: &BatchingTask, plan: LogicalPlan, ) -> Result<LogicalPlan>

Rewrite the completed query plan after incremental merging and before execution.

Source

fn stop(&self)

Retire this execution instance, rejecting new work and requesting that any retained local work stop. This is not an acknowledgement of remote quiescence.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§