Module datafusion_physical_expr::equivalence
source · Structs
- Represents a collection of
EquivalentClass
(equivalences between columns in relations) - EquivalentClass is a set of
Column
s orPhysicalSortExpr
s 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<PhysicalSortExpr>
is generated by theROW_NUMBER
window function. - This is a builder object facilitating incremental construction for ordering equivalences.
Functions
- Retrieves the ordering equivalence properties for a given schema and output ordering.
- 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.
- Update cast expressions inside ordering equivalence properties with its target column after projection
Type Definitions
OrderingEquivalenceProperties
keeps track of columns that describe the global ordering of the schema. These columns are not necessarily same; e.g.LexOrdering
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.