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 MirRelationExprs 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.

Print this MirRelationExpr to a JSON-formatted string.

Pretty-print this MirRelationExpr to a string with type information.

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>, 

Post-order immutable fallible MirRelationExpr visitor.

pub fn visit_post<'a, F>(&'a self, f: &mut F) where
    F: FnMut(&'a MirRelationExpr), 

Post-order immutable infallible MirRelationExpr visitor.

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), 

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 MirRelationExprs. The function post runs on child MirRelationExprs first before the parent.

Optionally, pre can return which child MirRelationExprs, if any, should be visited (default is to visit all children).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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