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 row_stream::SQLRowSource;
pub use row_stream::SQLRowStream;
pub use batch::Batch;
pub use batch::OwnedPhysicalRow;
pub use batch::PhysicalRow;
pub use batch::PhysicalRowView;
pub use batch::RowLockName;
pub use batch::RowLockOrigin;
pub use batch::RowProjectionValue;
pub use batch::RowSchemaExecution;
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 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::BackwardScanSupport;
pub use physical::ExecError;
pub use physical::ExecResult;
pub use physical::OperatorBatchCursor;
pub use physical::PhysicalOperator;
pub use physical::PhysicalOrder;
pub use physical::PhysicalScanDirection;
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_constant_scalar_with_control;
pub use scalar::eval_generated_scalar_with_control;
pub use scalar::eval_scalar;
pub use scalar::ScalarEvalContext;
pub use scalar::ScalarSubqueryRunner;
pub use scalar::SubqueryResult;
pub use scan::PhysicalRowIteratorScan;
pub use scan::RowIteratorScan;
pub use scan::RowSource;
pub use scan::TableScan;
pub use scope_overlay::ScopeOverlay;
pub use scroll_materialize::prepare_backward_scan;
pub use scroll_materialize::ScrollMaterialize;
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 operator_tree::ExecutionStats;
pub use operator_tree::OperatorOutput;
pub use operator_tree::OperatorTreeDriver;
pub use operator_tree::PlanExecutor;
pub use parallel::run_parallel;
pub use parallel::ParallelExecutor;
pub use parallel::DEFAULT_PARALLEL_WORKERS;
pub use parallel::MIN_PARALLEL_BRANCHES;

Modules§

aggregation
SQL aggregate planning, bounded execution, and finalization.
batch
Schema-bound, allocation-light physical rows and batches.
catalog
Immutable catalog inputs and runtime catalog projections.
column_selection
Schema-only projection used after an expression-producing stage.
columnar_batch
Positional, column-oriented batches for public result transfer.
copy
Execute COPY byte streams through the ordinary INSERT and SELECT statement paths.
distinct
Byte-bounded streaming physical DISTINCT operator.
external_sort
Byte-bounded external merge sort.
functions
Runtime contracts for scalar, table, and aggregate extensions.
join
Physical relational join operators.
join_output
Positional output shaping for JOIN ... USING and NATURAL JOIN.
lateral_join
Correlated physical join operator.
maintenance
Execute VACUUM target locking, physical rewrites, compaction and statistics refresh.
map_rows
Streaming whole-row mapping adapter.
mutation
Physical mutation identities, row images, command overlays, and prepared action transport.
operator_tree
Physical operator-tree execution and timing.
parallel
Rayon-backed parallel split + recombine, plus a branch-level ParallelExecutor for independent plan fragments.
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.
query
Query execution state and physical plan construction.
relational
Relational Volcano operators.
result
SQL result formatting, PostgreSQL type metadata and bounded columnar cursors.
routines
PL/pgSQL activation records, control flow, cursor loops, and diagnostics.
row_locks
Process-wide logical row locks for FOR UPDATE / FOR SHARE.
row_stream
Owned row production with an explicit, fallible cleanup boundary.
scalar
Scalar evaluation over the shared SQL IR.
scan
Scan operators.
schema
Physical schema changes and validation of stored rows.
scope_overlay
Positional overlay for a correlated outer query scope.
scroll_materialize
Incremental directional materialization for scrollable executor boundaries.
serializable
Logical relation and row observations selected by the executing access path.
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.
statement
SQL statement execution, transaction boundaries, and batch scheduling.
storage_errors
Typed transaction and resource diagnostics across execution storage capabilities.
type_resolution
SQL-owned type analysis retained at the execution crate’s public API boundary.
window
SQL window function evaluation. Window calls that partition and order their rows the same way share one sort, as the functions of one WindowAgg do, and each sorted partition is evaluated row by row with the frame semantics of nodeWindowAgg.c.

Structs§

BuiltinFunctionOverload
ColumnIdentity
Structured SQL column identity. A qualifier is metadata, never a prefix encoded into the column name, so quoted names containing . remain intact.
ResolvedFunctionOverload
RowSchema
Immutable column layout shared by an operator and all of its batches.
ScalarOrder
ScalarWindowFrame
ScalarWindowSpec

Enums§

JoinOutputSource
Source of one visible or hidden join-output identity.
ProjectionTarget
Identity assigned to one projection result. SQL columns participate in ordinary name binding and wildcard expansion; internal attributes are executor-only resjunk slots addressed structurally.
ResolvedStringBinaryOverload
ScalarExpr
ScalarFrameBound

Traits§

FunctionTypeResolver

Functions§

assignment_type_compatible
Whether PostgreSQL assignment coercion accepts the declared source and target. Domains use their base type for cast selection and retain constraint checking at the value conversion boundary; array coercion applies element by element.
bind_type_introspection
Bind polymorphic type-introspection calls and common-type coercions while the input schema still carries declared SQL types.
bind_type_introspection_with_resolver
Bind type-introspection calls with access to catalog-backed function and aggregate overloads.
builtin_function_argument_targets
Return the declared argument targets selected by PostgreSQL-compatible built-in resolution. Known argument types are retained for polymorphic calls, while fixed signatures and overloaded operators supply the context needed to resolve unknown arguments.
common_context_expression_type
Resolve an expression participating in PostgreSQL’s common-type selection. Bare string and NULL literals retain the parser’s unknown type until the surrounding VALUES, set operation, CASE, or array context selects a concrete type.
common_type
equality_operand_type
foreign_key_operand_type
Resolve the comparison type accepted by a PostgreSQL foreign key. The referenced key’s operator class makes compatibility directional: an implicit cast from the referencing type to the referenced type is valid, while the reverse cast alone is not. Integer widths, floating widths, character strings, and date/timestamp types additionally have cross-type equality operators in their shared operator families.
scalar_type
scalar_type_with_resolver
values_column_types

Type Aliases§

ResolvedChecksumOverload
ResolvedGammaOverload
ResolvedJsonStripOverload
ResolvedLengthOverload
ResolvedMd5Overload
ResolvedReverseOverload
ResolvedTextByteaOverload
SubqueryId
Index into the query children owned by the enclosing expression plan.