pub struct EquivalenceProperties { /* private fields */ }
Expand description

Represents a collection of EquivalentClass (equivalences between columns in relations)

This is used to represent:

  1. Equality conditions (like A=B), when T = Column

Implementations§

source§

impl EquivalenceProperties

source

pub fn new(schema: SchemaRef) -> Self

source

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

return the set of equivalences

source

pub fn schema(&self) -> SchemaRef

source

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

Add the EquivalentClass from iter to this list

source

pub fn add_equal_conditions(&mut self, new_conditions: (&Column, &Column))

Adds new equal conditions into the EquivalenceProperties. New equal conditions usually come from equality predicates in a join/filter.

source

pub fn normalize_expr( &self, expr: Arc<dyn PhysicalExpr> ) -> Arc<dyn PhysicalExpr>

Normalizes physical expression according to EquivalentClasses inside self.classes. expression is replaced with EquivalentClass::head expression if it is among EquivalentClass::others.

source

pub fn normalize_exprs( &self, exprs: &[Arc<dyn PhysicalExpr>] ) -> Vec<Arc<dyn PhysicalExpr>>

This function applies the [normalize_expr] function for all expression in exprs and returns a vector of normalized physical expressions.

source

pub fn normalize_sort_requirement( &self, sort_requirement: PhysicalSortRequirement ) -> PhysicalSortRequirement

This function normalizes sort_requirement according to EquivalenceClasses in the self. If the given sort requirement doesn’t belong to equivalence set inside self, it returns sort_requirement as is.

source

pub fn normalize_sort_requirements( &self, sort_reqs: &[PhysicalSortRequirement] ) -> Vec<PhysicalSortRequirement>

This function applies the [normalize_sort_requirement] function for all sort requirements in sort_reqs and returns a vector of normalized sort expressions.

source

pub fn normalize_sort_exprs( &self, sort_exprs: &[PhysicalSortExpr] ) -> Vec<PhysicalSortExpr>

Similar to the [normalize_sort_requirements] this function normalizes sort expressions in sort_exprs and returns a vector of normalized sort expressions.

Trait Implementations§

source§

impl Clone for EquivalenceProperties

source§

fn clone(&self) -> EquivalenceProperties

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 Debug for EquivalenceProperties

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> Allocation for Twhere T: RefUnwindSafe + Send + Sync,