struct UnionEquivalentOrderingBuilder {
orderings: Vec<LexOrdering>,
}Expand description
Builds valid output orderings of a UnionExec
Fields§
§orderings: Vec<LexOrdering>Implementations§
Source§impl UnionEquivalentOrderingBuilder
impl UnionEquivalentOrderingBuilder
fn new() -> Self
Sourcefn add_satisfied_orderings(
&mut self,
source: &EquivalenceProperties,
properties: &EquivalenceProperties,
) -> Result<()>
fn add_satisfied_orderings( &mut self, source: &EquivalenceProperties, properties: &EquivalenceProperties, ) -> Result<()>
Add all orderings from source that satisfy properties,
potentially augmented with the constants in source.
Note: Any column that is known to be constant can be inserted into the ordering without changing its meaning.
For example:
- Orderings in
sourcecontains[a ASC, c ASC]and constants containsb, propertieshas the ordering[a ASC, b ASC].
Then this will add [a ASC, b ASC] to the orderings list (as a was
in the sort order and b was a constant).
Sourcefn try_add_ordering(
&mut self,
ordering: LexOrdering,
constants: &[ConstExpr],
properties: &EquivalenceProperties,
properties_constants: &[ConstExpr],
) -> Result<AddedOrdering>
fn try_add_ordering( &mut self, ordering: LexOrdering, constants: &[ConstExpr], properties: &EquivalenceProperties, properties_constants: &[ConstExpr], ) -> Result<AddedOrdering>
Adds ordering, potentially augmented with constants, if it satisfies
the given properties.
§Returns
An AddedOrdering::Yes instance if the ordering was added (either
directly or augmented), or was empty. An AddedOrdering::No instance
otherwise.
Sourcefn try_find_augmented_ordering(
&mut self,
ordering: &LexOrdering,
constants: &[ConstExpr],
properties: &EquivalenceProperties,
properties_constants: &[ConstExpr],
) -> bool
fn try_find_augmented_ordering( &mut self, ordering: &LexOrdering, constants: &[ConstExpr], properties: &EquivalenceProperties, properties_constants: &[ConstExpr], ) -> bool
Attempts to add constants to ordering to satisfy the properties.
Returns true if augmentation took place, false otherwise.
Sourcefn augment_ordering(
ordering: &LexOrdering,
constants: &[ConstExpr],
existing_ordering: &LexOrdering,
existing_constants: &[ConstExpr],
) -> Option<LexOrdering>
fn augment_ordering( ordering: &LexOrdering, constants: &[ConstExpr], existing_ordering: &LexOrdering, existing_constants: &[ConstExpr], ) -> Option<LexOrdering>
Attempts to augment the ordering with constants to match existing_ordering.
Returns Some(ordering) if an augmented ordering was found, None otherwise.
fn build(self) -> Vec<LexOrdering>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnionEquivalentOrderingBuilder
impl !RefUnwindSafe for UnionEquivalentOrderingBuilder
impl Send for UnionEquivalentOrderingBuilder
impl Sync for UnionEquivalentOrderingBuilder
impl Unpin for UnionEquivalentOrderingBuilder
impl !UnwindSafe for UnionEquivalentOrderingBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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