Structs
- The
ExprOrdering
struct is designed to aid in the determination of ordering (represented bySortProperties
) for a givenPhysicalExpr
. When analyzing the orderings of aPhysicalExpr
, the process begins by assigning the ordering of its leaf nodes. By propagating these leaf node orderings upwards in the expression tree, the overall ordering of the entirePhysicalExpr
can be derived.
Enums
- To propagate
SortOptions
across thePhysicalExpr
, it is insufficient to simply useOption<SortOptions>
: There must be a differentiation between unordered columns and literal values, since literals may not break the ordering when they are used as a child of some binary expression when the other child has some ordering. On the other hand, unordered columns cannot maintain ordering when they take part in such operations.
Functions
- Calculates the
SortProperties
of a givenExprOrdering
node. The node is either a leaf node, or an intermediate node: