Skip to main content

ProxyJoinBackend

Trait ProxyJoinBackend 

Source
pub trait ProxyJoinBackend<T, B0, B1> {
    type Key: Copy + Ord;
    type V0: Copy + Ord;
    type V1: Copy + Ord;
    type R0: Semigroup + Multiply<Self::R1, Output = Self::ROut>;
    type R1: Semigroup;
    type ROut: Semigroup;
    type Output;

    // Required methods
    fn advance(
        &mut self,
        instance: &JoinInstance<T, B0, B1>,
        from: &mut KeyPosition<Self::Key>,
        bridge0: &mut ProxyBridge<T, Self::R0, Self::Key, Self::V0>,
        bridge1: &mut ProxyBridge<T, Self::R1, Self::Key, Self::V1>,
    );
    fn cross(
        &mut self,
        instance: &JoinInstance<T, B0, B1>,
        matches: &mut JoinMatches<T, Self::ROut, Self::Key, Self::V0, Self::V1>,
        output: &mut Vec<Self::Output>,
    );
}
Expand description

A type that can interpret and retire pairs of lists of batches, joined by keys.

The harness repeatedly invokes advance to draw a block of the proxy collection, then cross to turn that block’s matches into output containers, until advance reports the key space exhausted.

Required Associated Types§

Source

type Key: Copy + Ord

Independent groups, common to both inputs.

Source

type V0: Copy + Ord

First input value proxies, valid throughout a block.

Source

type V1: Copy + Ord

Second input value proxies, valid throughout a block.

Source

type R0: Semigroup + Multiply<Self::R1, Output = Self::ROut>

Diff type of the first input.

Source

type R1: Semigroup

Diff type of the second input.

Source

type ROut: Semigroup

Diff type of matched records (R0 * R1), computed by the harness.

Source

type Output

The output container built from matched value ids.

Required Methods§

Source

fn advance( &mut self, instance: &JoinInstance<T, B0, B1>, from: &mut KeyPosition<Self::Key>, bridge0: &mut ProxyBridge<T, Self::R0, Self::Key, Self::V0>, bridge1: &mut ProxyBridge<T, Self::R1, Self::Key, Self::V1>, )

Populates the two bridges with all updates for all keys that match in a returned range.

The from position is Start or an inclusive At(key) lower bound. The backend writes the window’s exclusive upper bound as At(key), or End when exhausted. Each call must strictly advance from. The returned bridges must contain all updates from both instance inputs for keys that are present in both inputs, and which are greater or equal to the initial from, and not greater or equal to its value when returned.

Source

fn cross( &mut self, instance: &JoinInstance<T, B0, B1>, matches: &mut JoinMatches<T, Self::ROut, Self::Key, Self::V0, Self::V1>, output: &mut Vec<Self::Output>, )

Interpret matches derived from the immediately preceding Self::advance call and place them in output. The iterator calls cross before another advance, so a backend may keep block-local interpretation state between the two calls. cross may be skipped when the block produced no matches, in which case the next advance may overwrite that state.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, B0, B1, B> ProxyJoinBackend<T, B0, B1> for BackendFrontier<B, T>
where T: Timestamp + Lattice, B: ProxyJoinBackend<T, B0, B1>,

Source§

type Key = <B as ProxyJoinBackend<T, B0, B1>>::Key

Source§

type V0 = <B as ProxyJoinBackend<T, B0, B1>>::V0

Source§

type V1 = <B as ProxyJoinBackend<T, B0, B1>>::V1

Source§

type R0 = <B as ProxyJoinBackend<T, B0, B1>>::R0

Source§

type R1 = <B as ProxyJoinBackend<T, B0, B1>>::R1

Source§

type ROut = <B as ProxyJoinBackend<T, B0, B1>>::ROut

Source§

type Output = <B as ProxyJoinBackend<T, B0, B1>>::Output