Struct expr::OptimizedMirRelationExpr [−][src]
pub struct OptimizedMirRelationExpr(pub MirRelationExpr);
Expand description
A MirRelationExpr
that claims to have been optimized, e.g., by an
transform::Optimizer
.
Tuple Fields
0: MirRelationExpr
Implementations
Declare that the input expr
is optimized, without actually running it
through an optimizer. This can be useful to mark as optimized literal
MirRelationExpr
s that are obviously optimal, without invoking the whole
machinery of the optimizer.
Get mutable access to the inner MirRelationExpr
Callers of this method need to ensure that the underlying expression stays optimized after any mutations are applied
Methods from Deref<Target = MirRelationExpr>
Reports the schema of the relation.
This method determines the type through recursive traversal of the relation expression, drawing from the types of base collections. As such, this is not an especially cheap method, and should be used judiciously.
The relation type is computed incrementally with a recursive post-order
traversal, that accumulates the input types for the relations yet to be
visited in type_stack
.
Reports the schema of the relation given the schema of the input relations.
input_types
is required to contain the schemas for the input relations of
the current relation in the same order as they are visited by try_visit1
method, even though not all may be used for computing the schema of the
current relation. For example, Let
expects two input types, one for the
value relation and one for the body, in that order, but only the one for the
body is used to determine the type of the Let
relation.
It is meant to be used during post-order traversals to compute relation schemas incrementally.
The number of columns in the relation.
This number is determined from the type, which is determined recursively at non-trivial cost.
The number of child relations this relation has.
Indicates if this is a constant empty collection.
A false value does not mean the collection is known to be non-empty, only that we cannot currently determine that it is statically empty.
Returns the distinct global identifiers on which this expression depends.
See MirRelationExpr::global_uses_into
to reuse an existing vector.
Appends global identifiers on which this expression depends to out
.
Unlike MirRelationExpr::global_uses
, this method does not deduplicate
the global identifiers.
Pretty-print this MirRelationExpr to a string.
This method allows an additional ExprHumanizer
which can annotate
identifiers with human-meaningful names for the identifiers.
Pretty-print this MirRelationExpr to a string with type information.
pub fn try_visit_children<'a, F, E>(&'a self, f: F) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
pub fn try_visit_children<'a, F, E>(&'a self, f: F) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Applies a fallible immutable f
to each child of type MirRelationExpr
.
Applies an infallible immutable f
to each child of type MirRelationExpr
.
pub fn try_visit_post<'a, F, E>(&'a self, f: &mut F) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
pub fn try_visit_post<'a, F, E>(&'a self, f: &mut F) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Post-order immutable fallible MirRelationExpr
visitor.
Post-order immutable infallible MirRelationExpr
visitor.
pub fn try_visit_pre<F, E>(&self, f: &mut F) -> Result<(), E> where
F: FnMut(&MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
pub fn try_visit_pre<F, E>(&self, f: &mut F) -> Result<(), E> where
F: FnMut(&MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Pre-order immutable fallible MirRelationExpr
visitor.
Pre-order immutable infallible MirRelationExpr
visitor.
pub fn visit_pre_post<F1, F2>(&self, pre: &mut F1, post: &mut F2) where
F1: FnMut(&MirRelationExpr) -> Option<Vec<&MirRelationExpr>>,
F2: FnMut(&MirRelationExpr),
pub fn visit_pre_post<F1, F2>(&self, pre: &mut F1, post: &mut F2) where
F1: FnMut(&MirRelationExpr) -> Option<Vec<&MirRelationExpr>>,
F2: FnMut(&MirRelationExpr),
A generalization of Self::visit_pre
and Self::visit_post
.
The function pre
runs on a MirRelationExpr
before it runs on any of the
child MirRelationExpr
s. The function post
runs on child MirRelationExpr
s
first before the parent.
Optionally, pre
can return which child MirRelationExpr
s, if any, should be
visited (default is to visit all children).
Trait Implementations
type Target = MirRelationExpr
type Target = MirRelationExpr
The resulting type after dereferencing.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for OptimizedMirRelationExpr
impl Send for OptimizedMirRelationExpr
impl Sync for OptimizedMirRelationExpr
impl Unpin for OptimizedMirRelationExpr
impl UnwindSafe for OptimizedMirRelationExpr
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more