Module datafusion_physical_expr::equivalence
source · Structs
- Represents a collection of
EquivalentClass(equivalences between columns in relations) - EquivalentClass is a set of
Columns orOrderedColumns that are known to have the same value in all tuples in a relation.EquivalentClass<Column>is generated by equality predicates, typically equijoin conditions and equality conditions in filters.EquivalentClass<OrderedColumn>is generated by theROW_NUMBERwindow function. - This object represents a
Columnwith a definite ordering, for exampleA ASCand is used to represent equivalent orderings in the optimizer. - This is a builder object facilitating incremental construction for ordering equivalences.
Functions
- This function applies the given projection to the given equivalence properties to compute the resulting (projected) equivalence properties; e.g.
- This function applies the given projection to the given ordering equivalence properties to compute the resulting (projected) ordering equivalence properties; e.g.
Type Definitions
OrderingEquivalencePropertieskeeps track of columns that describe the global ordering of the schema. These columns are not necessarily same; e.g.Vec<OrderedColumn>stores the lexicographical ordering for a schema. OrderingEquivalentClass keeps track of different alternative orderings than can describe the schema. For instance, for the table below |a|b|c|d| |1|4|3|1| |2|3|3|2| |3|1|2|2| |3|2|1|3| bothvec![a ASC, b ASC]andvec![c DESC, d ASC]describe the ordering of the table. For this case, we say thatvec![a ASC, b ASC], andvec![c DESC, d ASC]are ordering equivalent.