Expand description
Transformations that bring relation expressions to their canonical form.
This is achieved by:
- Bringing enclosed scalar expressions to a canonical form,
- Converting / peeling off part of the enclosing relation expression into another relation expression that can represent the same concept.
Modules§
- flat_
map_ 🔒elimination - For a
FlatMap
where the table function’s arguments are all constants, turns it intoMap
if only 1 row is produced by the table function, or turns it into an empty constant collection if 0 rows are produced by the table function. - projection_
extraction 🔒 - Transform column references in a
Map
into aProject
. - topk_
elision 🔒 - Remove TopK operators with both an offset of zero and no limit.
Structs§
- Flat
MapElimination - Attempts to eliminate FlatMaps that are sure to have 0 or 1 results on each input row.
- Projection
Extraction - Transform column references in a
Map
into aProject
, or repeated aggregations in aReduce
into aProject
. - Reduce
Scalars - A transform that visits each AST node and reduces scalar expressions.
- TopK
Elision - Remove TopK operators with both an offset of zero and no limit.