Expand description
Query operators for streaming execution.
This module provides Volcano-style operators that implement streaming
execution for SQL queries. Each operator implements the Operator trait
with open(), next(), close() lifecycle.
§Available Operators
§Join Operators
HashJoinOperator- Streaming hash join with O(N+M) complexityMergeJoinOperator- Merge join for pre-sorted inputs with O(N+M) complexityNestedLoopJoinOperator- Fallback for complex conditions with O(N*M) complexityIndexNestedLoopJoinOperator- Index-based join with O(N*log M) complexityBatchIndexNestedLoopJoinOperator- Batch variant for NO LIMIT queries
§Algorithm Selection
| Condition | Recommended Operator |
|---|---|
| Equality keys, large tables | HashJoinOperator |
| Both inputs pre-sorted | MergeJoinOperator |
| Inner table has index | IndexNestedLoopJoinOperator |
| No LIMIT + index available | BatchIndexNestedLoopJoinOperator |
| Non-equality conditions | NestedLoopJoinOperator |
| CROSS JOIN | NestedLoopJoinOperator |
§Note
For filtering and projection, use the Result Wrapper pattern:
FilteredResultwithRowFilterfor WHERE clausesStreamingProjectionResultfor column projection
See executor/result.rs and expression/evaluator_bridge.rs for the
recommended execution model.
Re-exports§
pub use crate::operator::ColumnSource;pub use crate::operator::JoinProjection;pub use bloom_filter::BloomFilterOperator;pub use count_integer_antijoin::CountIntegerAntiJoinOperator;pub use count_integer_antijoin::IntegerAntiJoinLookup;pub use count_pk_semijoin::CountPkSemiJoinOperator;pub use hash_join::HashJoinOperator;pub use hash_join::JoinSide;pub use hash_join::JoinType;pub use index_nested_loop::BatchIndexNestedLoopJoinOperator;pub use index_nested_loop::IndexLookupStrategy;pub use index_nested_loop::IndexNestedLoopJoinOperator;pub use merge_join::MergeJoinOperator;pub use nested_loop_join::NestedLoopJoinOperator;
Modules§
- bloom_
filter - Bloom filter operator for pre-join filtering.
- count_
integer_ antijoin - Count-only integer anti-join.
- count_
pk_ semijoin - Count-only unique PK semi-join.
- hash_
join - Streaming hash join operator.
- index_
nested_ loop - Index Nested Loop Join Operator.
- merge_
join - Merge Join Operator for pre-sorted inputs.
- nested_
loop_ join - Nested Loop Join Operator.