pub type OrderingEquivalenceProperties = EquivalenceProperties<LexOrdering>;
Expand description
OrderingEquivalenceProperties
keeps track of columns that describe the
global ordering of the schema. These columns are not necessarily same; e.g.
┌-------┐
| a | b |
|---|---|
| 1 | 9 |
| 2 | 8 |
| 3 | 7 |
| 5 | 5 |
└---┴---┘
where both a ASC
and b DESC
can describe the table ordering. With
OrderingEquivalenceProperties
, we can keep track of these equivalences
and treat a ASC
and b DESC
as the same ordering requirement.
Aliased Type§
struct OrderingEquivalenceProperties { /* private fields */ }
Implementations§
source§impl OrderingEquivalenceProperties
impl OrderingEquivalenceProperties
sourcepub fn satisfies_leading_ordering(
&self,
leading_ordering: &PhysicalSortExpr
) -> bool
pub fn satisfies_leading_ordering( &self, leading_ordering: &PhysicalSortExpr ) -> bool
Checks whether leading_ordering
is contained in any of the ordering
equivalence classes.
source§impl<T: Eq + Clone + Hash> EquivalenceProperties<T>
impl<T: Eq + Clone + Hash> EquivalenceProperties<T>
pub fn new(schema: SchemaRef) -> Self
sourcepub fn classes(&self) -> &[EquivalentClass<T>]
pub fn classes(&self) -> &[EquivalentClass<T>]
return the set of equivalences
pub fn schema(&self) -> SchemaRef
sourcepub fn extend<I: IntoIterator<Item = EquivalentClass<T>>>(&mut self, iter: I)
pub fn extend<I: IntoIterator<Item = EquivalentClass<T>>>(&mut self, iter: I)
Add the EquivalentClass
from iter
to this list
sourcepub fn add_equal_conditions(&mut self, new_conditions: (&T, &T))
pub fn add_equal_conditions(&mut self, new_conditions: (&T, &T))
Adds new equal conditions into the EquivalenceProperties. New equal conditions usually come from equality predicates in a join/filter.
Trait Implementations§
source§impl<T: Clone> Clone for EquivalenceProperties<T>
impl<T: Clone> Clone for EquivalenceProperties<T>
source§fn clone(&self) -> EquivalenceProperties<T>
fn clone(&self) -> EquivalenceProperties<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more