Expand description
Core expression language.
Modules§
- canonicalize
- Utility functions to transform parts of a single
MirRelationExpr
into canonical form. - explain
EXPLAIN
support for structures defined in this crate.- func
- id 🔒
- interpret 🔒
- like_
pattern - linear 🔒
- relation 🔒
- row
- scalar 🔒
- virtual_
syntax - A set of virtual nodes that are used to recover some high-level concepts that are desugared to non-trival terms in some IRs.
- visit
- Visitor support for recursive data types.
Structs§
- Aggregate
Expr - Describes an aggregation expression.
- Analyzed
Regex - Analyzed
Regex Opts - Capture
Group Desc - Column
Order - Specification for an ordering by a column.
- Column
Spec - Column
Specs - An interpreter that:
- Filter
Characteristics - Filter characteristics that are used for ordering join inputs.
This can be created for a
Vec<MirScalarExpr>
, which represents an AND of predicates. - Join
Input Mapper - Any column in a join expression exists in two contexts:
- LetRec
Limit - Maximum iterations for a LetRec.
- LocalId
- The identifier for a local component of a dataflow.
- MapFilter
Project - A compound operator that can be applied row-by-row.
- MfpPlan
- Predicates partitioned into temporal and non-temporal.
- Naive
OneBy OneAggr - Naive implementation of OneByOneAggr, suitable for stuff like const folding, but too slow for
rendering. This relies only on infrastructure available in
mz-expr
. It simply saves all the given input, and calls the given AggregateFunc’seval
method when asked about the current aggregate. (For Accumulable and Hierarchical aggregations, the rendering has more efficient implementations, but for Basic aggregations even the rendering uses this naive implementation.) - Optimized
MirRelation Expr - A
MirRelationExpr
that claims to have been optimized, e.g., by antransform::Optimizer
. - Proto
Aggregate Expr - Proto
Aggregate Func - Proto
Column Order - Proto
Domain Limit - Proto
Eval Error - ProtoId
- Proto
Local Id - Proto
MapFilter Project - Proto
MfpPlan - Proto
MirScalar Expr - Proto
RowSet Finishing - Proto
Safe MfpPlan - Proto
Table Func - Result
Spec - An approximation of the set of values an expression might have, including whether or not it might be null or an error value. This is generally an overapproximation, in the sense that ResultSpec::may_contain may return true even if the argument is not included in the set. (However, it should never return false when the value is included!)
- RowSet
Finishing - Instructions for finishing the result of a query.
- Safe
MfpPlan - A wrapper type which indicates it is safe to simply evaluate all expressions.
- Source
Instance Id - Unique identifier for an instantiation of a source.
- Trace
- An interpreter that returns whether or not a particular expression is “pushdownable”.
Broadly speaking, an expression is pushdownable if the result of evaluating the expression
depends on the range of possible column values in a way that
ColumnSpecs
is able to reason about. - Window
Frame - Describe a window frame, e.g.
RANGE UNBOUNDED PRECEDING
orROWS BETWEEN 5 PRECEDING AND CURRENT ROW
.
Enums§
- Access
Strategy - For a global Get, this indicates whether we are going to read from Persist or from an index. (See comment in MirRelationExpr::Get.)
- Aggregate
Func - Binary
Func - Eval
Error - Id
- An opaque identifier for a dataflow component. In other words, identifies
the target of a
MirRelationExpr::Get
. - Join
Implementation - Describe a join implementation in dataflow.
- Join
Input Characteristics - Characteristics of a join order candidate collection.
- LagLead
Type - Identify whether the given aggregate function is Lag or Lead, since they share implementations.
- MirRelation
Expr - An abstract syntax tree which defines a collection.
- MirScalar
Expr - Table
Func - Trace
Summary - A summary type for the Trace interpreter.
- Unary
Func - Unmaterializable
Func - Variadic
Func - Window
Frame Bound - Specifies WindowFrame’s
start_bound
andend_bound
- Window
Frame Units - Describe how frame bounds are interpreted
Constants§
- RECURSION_
LIMIT - A recursion limit to be used for stack-safe traversals of
MirRelationExpr
trees.
Traits§
- Collection
Plan - A trait for types that describe how to build a collection.
- Interpreter
- Abstract interpretation for MirScalarExpr.
- OneBy
OneAggr - An implementation of an aggregation where we can send in the input elements one-by-one, and can also ask the current aggregate at any moment. (This just delegates to other aggregation evaluation approaches.)
Functions§
- compare_
columns - Compare
left
andright
usingorder
. If that doesn’t produce a strict ordering, calltiebreaker
. - join_
permutations - Given the permutations (see
permutation_for_arrangement
and (dataflow::plan::AvailableCollections
) corresponding to two collections with the same key arity, computes the permutation for the result of joining them. - memoize_
expr - Recursively memoize parts of
expr
, storing those parts inmemoized_parts
. - non_
nullable_ columns - Augment non-nullability of columns, by observing either
- order_
aggregate_ datums_ exported_ for_ benchmarking - Assuming datums is a List, sort them by the 2nd through Nth elements corresponding to order_by, then return the 1st element.
- permutation_
for_ arrangement - Derive supporting logic to support transforming rows to (key, val) pairs, and back again.