Struct datafusion::physical_expr::equivalence::EquivalenceGroup
source · pub struct EquivalenceGroup { /* private fields */ }
Expand description
An EquivalenceGroup
is a collection of EquivalenceClass
es where each
class represents a distinct equivalence class in a relation.
Implementations§
source§impl EquivalenceGroup
impl EquivalenceGroup
sourcepub fn normalize_expr(
&self,
expr: Arc<dyn PhysicalExpr>
) -> Arc<dyn PhysicalExpr>
pub fn normalize_expr( &self, expr: Arc<dyn PhysicalExpr> ) -> Arc<dyn PhysicalExpr>
Normalizes the given physical expression according to this group. The expression is replaced with the first expression in the equivalence class it matches with (if any).
sourcepub fn normalize_sort_expr(
&self,
sort_expr: PhysicalSortExpr
) -> PhysicalSortExpr
pub fn normalize_sort_expr( &self, sort_expr: PhysicalSortExpr ) -> PhysicalSortExpr
Normalizes the given sort expression according to this group. The underlying physical expression is replaced with the first expression in the equivalence class it matches with (if any). If the underlying expression does not belong to any equivalence class in this group, returns the sort expression as is.
sourcepub fn normalize_sort_requirement(
&self,
sort_requirement: PhysicalSortRequirement
) -> PhysicalSortRequirement
pub fn normalize_sort_requirement( &self, sort_requirement: PhysicalSortRequirement ) -> PhysicalSortRequirement
Normalizes the given sort requirement according to this group. The underlying physical expression is replaced with the first expression in the equivalence class it matches with (if any). If the underlying expression does not belong to any equivalence class in this group, returns the given sort requirement as is.
sourcepub fn normalize_exprs(
&self,
exprs: impl IntoIterator<Item = Arc<dyn PhysicalExpr>>
) -> Vec<Arc<dyn PhysicalExpr>>
pub fn normalize_exprs( &self, exprs: impl IntoIterator<Item = Arc<dyn PhysicalExpr>> ) -> Vec<Arc<dyn PhysicalExpr>>
This function applies the normalize_expr
function for all expressions
in exprs
and returns the corresponding normalized physical expressions.
sourcepub fn normalize_sort_exprs(
&self,
sort_exprs: &[PhysicalSortExpr]
) -> Vec<PhysicalSortExpr>
pub fn normalize_sort_exprs( &self, sort_exprs: &[PhysicalSortExpr] ) -> Vec<PhysicalSortExpr>
This function applies the normalize_sort_expr
function for all sort
expressions in sort_exprs
and returns the corresponding normalized
sort expressions.
sourcepub fn normalize_sort_requirements(
&self,
sort_reqs: &[PhysicalSortRequirement]
) -> Vec<PhysicalSortRequirement>
pub fn normalize_sort_requirements( &self, sort_reqs: &[PhysicalSortRequirement] ) -> Vec<PhysicalSortRequirement>
This function applies the normalize_sort_requirement
function for all
requirements in sort_reqs
and returns the corresponding normalized
sort requirements.
sourcepub fn project(&self, mapping: &ProjectionMapping) -> EquivalenceGroup
pub fn project(&self, mapping: &ProjectionMapping) -> EquivalenceGroup
Projects this equivalence group according to the given projection mapping.
sourcepub fn join(
&self,
right_equivalences: &EquivalenceGroup,
join_type: &JoinType,
left_size: usize,
on: &[(Column, Column)]
) -> EquivalenceGroup
pub fn join( &self, right_equivalences: &EquivalenceGroup, join_type: &JoinType, left_size: usize, on: &[(Column, Column)] ) -> EquivalenceGroup
Combine equivalence groups of the given join children.
Trait Implementations§
source§impl Clone for EquivalenceGroup
impl Clone for EquivalenceGroup
source§fn clone(&self) -> EquivalenceGroup
fn clone(&self) -> EquivalenceGroup
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more