Skip to main content

Crate uqa_execution

Crate uqa_execution 

Source
Expand description

Volcano-model physical operator pipeline.

The pipeline uses an open / next / close iterator protocol with row-oriented batches so the engine can expose the operator surface without the arrow-rs build dependency. The operator trait and operator catalogue defined here are the execution contract.

§Operator catalogue

  • scan::TableScan – pulls every row of a logical relation into the pipeline. The relation source is supplied through scan::RowSource, so the caller decides whether the rows come from the engine’s per-table store, a CTE materialisation, or an FDW.
  • relational::Filter – keeps rows for which the predicate evaluates truthy.
  • relational::Project – emits a new schema by evaluating an expression list against each row.
  • relational::Sort – fully materialises the input, sorts by a list of (expr, descending) keys, and yields the sorted rows in batches.
  • relational::Limit – caps the row count at offset + limit, skipping the first offset rows.
  • relational::HashAggregate – group-by + aggregate over a blocking input, supporting COUNT, SUM, AVG, MIN, MAX.
  • relational::Window – partition + order + frame-aware computation of ROW_NUMBER / RANK / DENSE_RANK / LAG / LEAD / NTILE and pure aggregate windows.
  • spill::SpillBuffer – disk-backed row buffer for blocking operators that exceed an in-memory budget.

Re-exports§

pub use batch::Batch;
pub use batch::ColumnIdentity;
pub use batch::OwnedPhysicalRow;
pub use batch::PhysicalRow;
pub use batch::PhysicalRowView;
pub use batch::RowLockOrigin;
pub use batch::RowProjectionValue;
pub use batch::RowSchema;
pub use batch::DEFAULT_BATCH_SIZE;
pub use column_selection::ColumnSelection;
pub use columnar_batch::ColumnVector;
pub use columnar_batch::ColumnarBatch;
pub use distinct::canonical_row_key;
pub use distinct::hash_canonical_row;
pub use distinct::try_pack_compact_text_pair;
pub use distinct::CanonicalRowHashSet;
pub use distinct::Distinct;
pub use distinct::ExactRowSet;
pub use external_sort::ExternalSort;
pub use external_sort::EXTERNAL_SORT_MERGE_FAN_IN;
pub use join::HashJoin;
pub use join::NestedLoopJoin;
pub use join_output::JoinOutput;
pub use join_output::JoinOutputSource;
pub use lateral_join::LateralJoin;
pub use lateral_join::LateralRows;
pub use lateral_join::LateralSource;
pub use map_rows::MapRows;
pub use map_rows::SharedRowMapper;
pub use physical::order_expression_position;
pub use physical::ordering_satisfies;
pub use physical::ExecError;
pub use physical::ExecResult;
pub use physical::OperatorBatchCursor;
pub use physical::PhysicalOperator;
pub use physical::PhysicalOrder;
pub use project_set::PhysicalProjectRows;
pub use project_set::PhysicalProjectSet;
pub use project_set::PhysicalSetProjector;
pub use project_set::ProjectRows;
pub use project_set::ProjectSet;
pub use project_set::SetProjector;
pub use projected_predicate::ProjectedPredicate;
pub use projected_row::ProjectedRow;
pub use projected_row::ProjectedValueSlot;
pub use relational::AggregateExecutor;
pub use relational::AggregateKind;
pub use relational::AggregateSpec;
pub use relational::ExpressionEvaluator;
pub use relational::Filter;
pub use relational::HashAggregate;
pub use relational::Limit;
pub use relational::Project;
pub use relational::RowPredicate;
pub use relational::SetOperation;
pub use relational::SharedExpressionEvaluator;
pub use relational::SharedRowPredicate;
pub use relational::Sort;
pub use relational::SortKey;
pub use relational::Window;
pub use relational::WindowExecutor;
pub use relational::WindowKind;
pub use scalar::eval_call_arguments;
pub use scalar::eval_scalar;
pub use scalar::ScalarEvalContext;
pub use scalar::ScalarExpr;
pub use scalar::ScalarFrameBound;
pub use scalar::ScalarOrder;
pub use scalar::ScalarSubqueryRunner;
pub use scalar::ScalarWindowFrame;
pub use scalar::ScalarWindowSpec;
pub use scalar::SubqueryId;
pub use scalar::SubqueryResult;
pub use scan::RowIteratorScan;
pub use scan::RowSource;
pub use scan::TableScan;
pub use scope_overlay::ScopeOverlay;
pub use set_operation::ExternalSetOperation;
pub use spill::IndexedSpill;
pub use spill::SharedSpill;
pub use spill::SharedSpillReader;
pub use spill::SpillBuffer;
pub use spill_scan::SharedSpillScan;
pub use spill_scan::SpillScan;
pub use type_resolution::bind_type_introspection;
pub use type_resolution::bind_type_introspection_with_resolver;
pub use type_resolution::common_context_expression_type;
pub use type_resolution::common_type;
pub use type_resolution::equality_operand_type;
pub use type_resolution::scalar_type;
pub use type_resolution::scalar_type_with_resolver;
pub use type_resolution::values_column_types;
pub use type_resolution::FunctionTypeResolver;

Modules§

batch
Schema-bound, allocation-light physical rows and batches.
column_selection
Schema-only projection used after an expression-producing stage.
columnar_batch
Positional, column-oriented batches for public result transfer.
distinct
Byte-bounded streaming physical DISTINCT operator.
external_sort
Byte-bounded external merge sort.
join
Physical relational join operators.
join_output
Positional output shaping for JOIN ... USING and NATURAL JOIN.
lateral_join
Correlated physical join operator.
map_rows
Streaming whole-row mapping adapter.
physical
Volcano PhysicalOperator trait shared by every operator in this crate.
project_set
Streaming one-to-many projection (ProjectSet).
projected_predicate
Scalar predicates compiled against positional storage projections.
projected_row
Borrowed positional rows produced directly by projected storage reads.
relational
Relational Volcano operators.
scalar
AST-independent scalar physical IR shared by the planner and executors.
scan
Scan operators.
scope_overlay
Positional overlay for a correlated outer query scope.
set_operation
Byte-bounded physical SQL set operations.
spill
Disk-backed spill buffer for blocking operators (Sort, HashAggregate, Window).
spill_scan
Volcano scan over an owned crate::spill::SpillBuffer.
type_resolution
Static SQL type propagation and PostgreSQL-compatible common-type rules.