pub struct EquivalenceClass { /* private fields */ }
Expand description
An EquivalenceClass
is a set of Arc<dyn PhysicalExpr>
s that are known
to have the same value for all tuples in a relation. These are generated by
equality predicates (e.g. a = b
), typically equi-join conditions and
equality conditions in filters.
Two EquivalenceClass
es are equal if they contains the same expressions in
without any ordering.
Implementations§
Source§impl EquivalenceClass
impl EquivalenceClass
pub fn new(exprs: Vec<Arc<dyn PhysicalExpr>>) -> Self
Sourcepub fn into_vec(self) -> Vec<Arc<dyn PhysicalExpr>>
pub fn into_vec(self) -> Vec<Arc<dyn PhysicalExpr>>
Return the inner vector of expressions
Sourcepub fn push(&mut self, expr: Arc<dyn PhysicalExpr>)
pub fn push(&mut self, expr: Arc<dyn PhysicalExpr>)
Insert the expression into this class, meaning it is known to be equal to all other expressions in this class
Sourcepub fn contains(&self, expr: &Arc<dyn PhysicalExpr>) -> bool
pub fn contains(&self, expr: &Arc<dyn PhysicalExpr>) -> bool
Returns true if this equivalence class contains t expression
Sourcepub fn contains_any(&self, other: &Self) -> bool
pub fn contains_any(&self, other: &Self) -> bool
Returns true if this equivalence class has any entries in common with other
Sourcepub fn iter(&self) -> impl Iterator<Item = &Arc<dyn PhysicalExpr>>
pub fn iter(&self) -> impl Iterator<Item = &Arc<dyn PhysicalExpr>>
Iterate over all elements in this class, in some arbitrary order
Sourcepub fn with_offset(&self, offset: usize) -> Self
pub fn with_offset(&self, offset: usize) -> Self
Return a new equivalence class that have the specified offset added to each expression (used when schemas are appended such as in joins)
Trait Implementations§
Source§impl Clone for EquivalenceClass
impl Clone for EquivalenceClass
Source§fn clone(&self) -> EquivalenceClass
fn clone(&self) -> EquivalenceClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EquivalenceClass
impl Debug for EquivalenceClass
Source§impl Display for EquivalenceClass
impl Display for EquivalenceClass
Auto Trait Implementations§
impl Freeze for EquivalenceClass
impl !RefUnwindSafe for EquivalenceClass
impl Send for EquivalenceClass
impl Sync for EquivalenceClass
impl Unpin for EquivalenceClass
impl !UnwindSafe for EquivalenceClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more