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 more