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

source

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>

source

pub fn new(schema: SchemaRef) -> Self

source

pub fn classes(&self) -> &[EquivalentClass<T>]

return the set of equivalences

source

pub fn schema(&self) -> SchemaRef

source

pub fn extend<I: IntoIterator<Item = EquivalentClass<T>>>(&mut self, iter: I)

Add the EquivalentClass from iter to this list

source

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>

source§

fn clone(&self) -> EquivalenceProperties<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for EquivalenceProperties<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more