Module datafusion_physical_expr::equivalence
source · Structs
- Represents a collection of
EquivalentClass(equivalences between columns in relations) - EquivalentClass is a set of
Columns orPhysicalSortExprs 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_NUMBERwindow function. - This is a builder object facilitating incremental construction for ordering equivalences.
OrderingEquivalencePropertieskeeps track of columns that describe the global ordering of the schema. These columns are not necessarily same; e.g.
Functions
- Adds the
offsetvalue toColumnindices for eachsort_expr.exprinsidesort_exprs. - Retrieves the ordering equivalence properties for a given schema and output ordering.
- It is similar to contains method of vector. Finds whether
expris amongphysical_exprs. - 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 Aliases
LexOrderingstores 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.