Struct dataflow::render::context::CollectionBundle[][src]

pub struct CollectionBundle<S: Scope, V: Data, T: Lattice> where
    T: Timestamp + Lattice,
    S::Timestamp: Lattice + Refines<T>, 
{ pub collection: Option<(Collection<S, V, Diff>, Collection<S, DataflowError, Diff>)>, pub arranged: BTreeMap<Vec<MirScalarExpr>, ArrangementFlavor<S, V, T>>, }
Expand description

A bundle of the various ways a collection can be represented.

This type maintains the invariant that it does contain at least one valid source of data, either a collection or at least one arrangement.

Fields

collection: Option<(Collection<S, V, Diff>, Collection<S, DataflowError, Diff>)>arranged: BTreeMap<Vec<MirScalarExpr>, ArrangementFlavor<S, V, T>>

Implementations

Construct a new collection bundle from update streams.

Inserts arrangements by the expressions on which they are keyed.

Inserts arrangements by the columns on which they are keyed.

Asserts that the arrangement for a specific key (or the raw collection for no key) exists, and returns the corresponding collection.

This returns the collection as-is, without doing any unthinning transformation. Therefore, it should be used when the appropriate transformation was planned as part of a following MFP.

Constructs and applies logic to elements of a collection and returns the results.

constructor takes a permutation and produces the logic to apply on elements. The logic conceptually receives (&Row, &Row) pairs in the form of a slice. Only after borrowing the elements and applying the permutation the datums will be in the expected order.

If key_val is set, this is a promise that logic will produce no results on records for which the key does not evaluate to the value. This is used when we have an arrangement by that key to leap directly to exactly those records. It is important that logic still guard against data that does not satisfy this constraint, as this method does not statically know that it will have that arrangement.

Factored out common logic for using literal keys in general traces.

This logic is sufficiently interesting that we want to write it only once, and thereby avoid any skew in the two uses of the logic.

The function presents the contents of the trace as (key, value, time, delta) tuples, where key and value are rows.

Look up an arrangement by the expressions that form the key.

The result may be None if no such arrangement exists, or it may be one of many “arrangement flavors” that represent the types of arranged data we might have.

Presents self as a stream of updates, having been subjected to mfp.

This operator is able to apply the logic of mfp early, which can substantially reduce the amount of data produced when mfp is non-trivial.

The key_val argument, when present, indicates that a specific arrangement should be used, and if, in addition, the val component is present, that we can seek to the supplied row.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 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