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

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

Reports the column types of the relation given the column types of the input relations.

input_types is required to contain the column types for the input relations of the current relation in the same order as they are visited by try_visit_children 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 column types incrementally.

Reports the unique keys of the relation given the arities and the unique keys of the input relations.

input_arities and input_keys are required to contain the corresponding info for the input relations of the current relation in the same order as they are visited by try_visit_children 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 unique keys incrementally.

The number of columns in the relation.

This number is determined from the type, which is determined recursively at non-trivial cost.

The arity is computed incrementally with a recursive post-order traversal, that accumulates the arities for the relations yet to be visited in arity_stack.

Reports the arity of the relation given the schema of the input relations.

input_arities is required to contain the arities for the input relations of the current relation in the same order as they are visited by try_visit_children 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 arities incrementally.

The number of child relations this relation has.

If self is a constant, return the value and the type, otherwise None. Looks behind ArrangeBys.

If self is a constant error, return the error, otherwise None. Looks behind ArrangeBys.

Checks if self is the single element collection with no columns.

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.

If the expression is a negated project, return the input and the projection.

Pretty-print this MirRelationExpr to a string.

True iff the expression contains a NullaryFunc::MzLogicalTimestamp.

Fallible visitor for the MirScalarExprs directly owned by this relation expression.

The f visitor should not recursively descend into owned MirRelationExprs.

Fallible immutable visitor for the MirScalarExprs in the MirRelationExpr subtree rooted at self.

Note that this does not recurse into MirRelationExpr subtrees within MirScalarExpr nodes.

Infallible immutable visitor for the MirScalarExprs in the MirRelationExpr subtree rooted at at self.

Note that this does not recurse into MirRelationExpr subtrees within MirScalarExpr nodes.

Computes the size (total number of nodes) and maximum depth of a MirRelationExpr for debug printing purposes. Might grow the stack to a size proportional to the maximum depth.

True when expr contains a LetRec AST node.

Iterates through references to child expressions.

Iterative pre-order visitor.

Return a vector of references to the subtrees of this expression in post-visit order (the last element is &self).

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Appends global identifiers on which this plan depends to out.
Returns the global identifiers on which this plan depends. 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 ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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.

Returns the argument unchanged.

Converts to this type from a reference to the input type.
Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
The type of the output value.
A well-distributed integer derived from the data.
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

Calls U::from(self).

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

Wrap the input message T in a tonic::Request
Upcasts this ProgressEventTimestamp to Any. Read more
Returns the name of the concrete type of this object. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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