Skip to main content

PlanNode

Trait PlanNode 

Source
pub trait PlanNode {
    // Required methods
    fn schema(&self) -> &Schema;
    fn next(&mut self) -> Result<Option<Row>>;

    // Provided methods
    fn reset(&mut self) -> Result<()> { ... }
    fn collect_all(&mut self) -> Result<Vec<Row>> { ... }
}
Expand description

Volcano-model plan node.

Each operator implements next() which returns one row at a time, pulling from child operators on demand. This enables streaming execution with predictable memory usage.

while let Some(row) = node.next()? {
    // process row
}

Required Methods§

Source

fn schema(&self) -> &Schema

Schema of rows produced by this node.

Source

fn next(&mut self) -> Result<Option<Row>>

Return the next row, or None when exhausted.

Provided Methods§

Source

fn reset(&mut self) -> Result<()>

Reset the operator for re-execution (e.g., inner side of nested loop join).

Source

fn collect_all(&mut self) -> Result<Vec<Row>>

Collect all remaining rows (convenience method).

Trait Implementations§

Source§

impl PlanNode for Box<dyn PlanNode>

Blanket impl so Box<dyn PlanNode> itself implements PlanNode.

Source§

fn schema(&self) -> &Schema

Schema of rows produced by this node.
Source§

fn next(&mut self) -> Result<Option<Row>>

Return the next row, or None when exhausted.
Source§

fn reset(&mut self) -> Result<()>

Reset the operator for re-execution (e.g., inner side of nested loop join).
Source§

fn collect_all(&mut self) -> Result<Vec<Row>>

Collect all remaining rows (convenience method).

Implementations on Foreign Types§

Source§

impl PlanNode for Box<dyn PlanNode>

Blanket impl so Box<dyn PlanNode> itself implements PlanNode.

Source§

fn schema(&self) -> &Schema

Source§

fn next(&mut self) -> Result<Option<Row>>

Source§

fn reset(&mut self) -> Result<()>

Implementors§