pub struct DependencyEnumerator<'a> {
seen: IndexMap<&'a PhysicalSortExpr, IndexSet<&'a PhysicalSortExpr>>,
}Expand description
Contains a mapping of all dependencies we have processed for each sort expr
Fields§
§seen: IndexMap<&'a PhysicalSortExpr, IndexSet<&'a PhysicalSortExpr>>Maps expr –> [exprs] that have previously been processed
Implementations§
Source§impl<'a> DependencyEnumerator<'a>
impl<'a> DependencyEnumerator<'a>
pub fn new() -> Self
Sourcefn insert(
&mut self,
target: &'a PhysicalSortExpr,
dep: &'a PhysicalSortExpr,
) -> bool
fn insert( &mut self, target: &'a PhysicalSortExpr, dep: &'a PhysicalSortExpr, ) -> bool
Insert a new dependency,
returns false if the dependency was already in the map returns true if the dependency was newly inserted
Sourcepub fn construct_orderings(
&mut self,
referred_sort_expr: &'a PhysicalSortExpr,
dependency_map: &'a DependencyMap,
) -> Vec<LexOrdering>
pub fn construct_orderings( &mut self, referred_sort_expr: &'a PhysicalSortExpr, dependency_map: &'a DependencyMap, ) -> Vec<LexOrdering>
This function recursively analyzes the dependencies of the given sort expression within the given dependency map to construct lexicographical orderings that include the sort expression and its dependencies.
§Parameters
referred_sort_expr: A reference to the sort expression (PhysicalSortExpr) for which lexicographical orderings satisfying its dependencies are to be constructed.dependency_map: A reference to theDependencyMapthat contains dependencies for differentPhysicalSortExprs.
§Returns
A vector of lexicographical orderings (Vec<LexOrdering>) based on the given
sort expression and its dependencies.
Auto Trait Implementations§
impl<'a> Freeze for DependencyEnumerator<'a>
impl<'a> !RefUnwindSafe for DependencyEnumerator<'a>
impl<'a> Send for DependencyEnumerator<'a>
impl<'a> Sync for DependencyEnumerator<'a>
impl<'a> Unpin for DependencyEnumerator<'a>
impl<'a> !UnwindSafe for DependencyEnumerator<'a>
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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