pub struct EquivalenceProperties<T = Column> { /* private fields */ }
Expand description
Represents a collection of EquivalentClass
(equivalences
between columns in relations)
This is used to represent both:
- Equality conditions (like
A=B
), whenT
=Column
- Ordering (like
A ASC = B ASC
), whenT
=PhysicalSortExpr
Implementations§
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.
source§impl EquivalenceProperties<Vec<PhysicalSortExpr, Global>>
impl EquivalenceProperties<Vec<PhysicalSortExpr, Global>>
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.
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 moreAuto Trait Implementations§
impl<T> RefUnwindSafe for EquivalenceProperties<T>where T: RefUnwindSafe,
impl<T> Send for EquivalenceProperties<T>where T: Send,
impl<T> Sync for EquivalenceProperties<T>where T: Sync,
impl<T> Unpin for EquivalenceProperties<T>where T: Unpin,
impl<T> UnwindSafe for EquivalenceProperties<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more