Skip to main content

PhysicalOp

Trait PhysicalOp 

Source
pub trait PhysicalOp: Send {
    // Required methods
    fn schema(&self) -> &ArraySchema;
    fn next_chunk(&mut self) -> Result<Option<Chunk>, ExecError>;
    fn reset(&mut self);

    // Provided method
    fn finalize_aggregate(
        &mut self,
    ) -> Result<Option<Vec<(String, ScalarValue)>>, ExecError> { ... }
}
Expand description

Trait for volcano-style physical operators.

Each operator pulls one chunk at a time from its children. Memory usage = O(chunk_size), not O(array_size).

Required Methods§

Source

fn schema(&self) -> &ArraySchema

Returns the output schema for this operator.

Source

fn next_chunk(&mut self) -> Result<Option<Chunk>, ExecError>

Pulls the next chunk from this operator.

Returns Ok(None) when all chunks have been consumed.

Source

fn reset(&mut self)

Resets the operator to re-scan from the beginning.

Provided Methods§

Source

fn finalize_aggregate( &mut self, ) -> Result<Option<Vec<(String, ScalarValue)>>, ExecError>

Aggregate operators override this to consume all input and return scalar results. Returns Ok(None) for non-aggregate operators.

Implementors§