Struct dataflow_types::plan::join::JoinBuildState[][src]

pub struct JoinBuildState {
    column_map: HashMap<usize, usize>,
    equivalences: Vec<Vec<MirScalarExpr>>,
    mfp: MapFilterProject,
}
Expand description

Maintained state as we construct join dataflows.

This state primarily tracks the remaining work that has not yet been applied to a stream of partial results.

This state is meant to reconcile the logical operations that remain to apply (e.g. filtering, expressions, projection) and the physical organization of the current stream of data, which columns may be partially assembled in non-standard locations and which may already have been partially subjected to logic we need to apply.

Fields

column_map: HashMap<usize, usize>

Map from expected locations in extended output column reckoning to physical locations.

equivalences: Vec<Vec<MirScalarExpr>>

A list of equivalence classes of expressions.

Within each equivalence class, expressions must evaluate to the same result to pass the join expression. Importantly, “the same” should be evaluated with Datums Rust equality, rather than the equality presented by the BinaryFunc equality operator. The distinction is important for null handling, at the least.

mfp: MapFilterProject

The linear operator logic (maps, filters, and projection) that remains to be applied to the output of the join.

When we advance through the construction of the join dataflow, we may be able to peel off some of this work, ideally reducing mfp to something nearly the identity.

Implementations

Create a new join state and initial closure from initial values.

The initial closure can be None which indicates that it is the identity operator.

Present new columns and extract any newly available closure.

Extract a final MapFilterProject once all columns are available.

If not all columns are available this method will likely panic. This method differs from extract_closure in that it forcibly completes the join, extracting projections and expressions that may not be extracted with extract_closure (for example, literals, permutations, and repetition of output columns).

The resulting closure may be the identity operator, which can be checked with the is_identity() method.

A method on self that extracts an available closure.

The extracted closure is not guaranteed to be non-trivial. Sensitive users should consider using the .is_identity() method to determine non-triviality.

Trait Implementations

Formats the value using the given formatter. 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

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