Skip to main content

Module executor

Module executor 

Source
Expand description

§Unified Volcano Query Executor (v1.0)

Single pipeline for all SQL execution:

SQL Text → Parser → AST → Planner → Volcano Operator Tree → Row-at-a-time → Result

§Architecture

All operators implement the PlanNode trait (Volcano iterator model):

trait PlanNode {
    fn schema(&self) -> &Schema;
    fn next(&mut self) -> Result<Option<Row>>;
}

Operators form a tree: each next() call pulls one row from its children, processes it, and returns the result. This enables streaming execution with minimal memory footprint.

§Operators

OperatorDescription
SeqScanFull table scan via StorageBackend
IndexSeekIndex-based lookup via StorageBackend
FilterPredicate evaluation (WHERE)
ProjectColumn selection + expression eval
SortIn-memory sort (materializing)
LimitLIMIT + OFFSET
HashJoinHash-based equi-join
NestedLoopJoinNested loop join (theta joins)
MergeJoinMerge join on sorted inputs
HashAggregateGROUP BY + aggregate functions
ExplainEXPLAIN plan output
ValuesInline VALUES (…) rows
EmptyReturns no rows

Re-exports§

pub use types::Row;
pub use types::Schema;
pub use types::ColumnMeta;
pub use node::PlanNode;
pub use eval::eval_expr;
pub use eval::eval_predicate;
pub use scan::SeqScanNode;
pub use scan::IndexSeekNode;
pub use filter::FilterNode;
pub use project::ProjectNode;
pub use sort::SortNode;
pub use limit::LimitNode;
pub use join::HashJoinNode;
pub use join::NestedLoopJoinNode;
pub use join::MergeJoinNode;
pub use aggregate::HashAggregateNode;
pub use explain::ExplainNode;
pub use planner::QueryPlanner;
pub use pipeline::execute_sql;
pub use pipeline::execute_statement;
pub use pipeline::ExecutorConfig;

Modules§

aggregate
Hash aggregate operator (GROUP BY + aggregate functions).
eval
SQL expression evaluator over Volcano rows.
explain
EXPLAIN operator — generates query plan description as rows.
filter
Filter operator (WHERE clause).
join
Join operators: HashJoin, NestedLoopJoin, MergeJoin.
limit
Limit + Offset operator.
node
Volcano iterator model trait.
pipeline
Unified execution pipeline: SQL text → result.
planner
Query planner: SQL AST → Volcano operator tree.
project
Project operator (column selection and expression evaluation).
scan
Table scan and index seek operators.
sort
Sort operator.
types
Core types for the Volcano executor.