Skip to main content

BackendFrontier

Struct BackendFrontier 

Source
pub struct BackendFrontier<B, T> { /* private fields */ }
Expand description

A backend whose inputs are read as of since: every time the inner backend draws is advanced by it, and what then coincides is consolidated.

Only reads are translated. Outputs are the inner backend’s, at the operator’s times, which are beyond since once its inputs are. An empty since reads the inputs as they are.

Implementations§

Source§

impl<B, T> BackendFrontier<B, T>

Source

pub fn new(inner: B, since: Antichain<T>) -> Self

Read inner‘s inputs as of since, which must be beyond every frontier the inputs’ traces have compacted by (see the module documentation).

Source

pub fn since(&self) -> &Antichain<T>

The frontier the inputs are read as of.

Source

pub fn inner(&self) -> &B

The wrapped backend.

Source

pub fn inner_mut(&mut self) -> &mut B

The wrapped backend, mutably: a wrapper implementing a backend trait defined outside this crate, such as dogs3’s half-join backend, drives the inner backend through this.

Trait Implementations§

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

Independent groups, common to both inputs.
Source§

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

First input value proxies, valid throughout a block.
Source§

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

Second input value proxies, valid throughout a block.
Source§

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

Diff type of the first input.
Source§

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

Diff type of the second input.
Source§

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

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

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

The output container built from matched value ids.
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. Read more
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.
Source§

impl<T, B1, B2, B> ProxyReduceBackend<T, B1, B2> for BackendFrontier<B, T>
where T: Timestamp + Lattice, B: ProxyReduceBackend<T, B1, B2>,

Source§

type Key = <B as ProxyReduceBackend<T, B1, B2>>::Key

Independent groups, with identities stable across retires.
Source§

type VIn = <B as ProxyReduceBackend<T, B1, B2>>::VIn

Input value proxies, valid throughout a window.
Source§

type VOut = <B as ProxyReduceBackend<T, B1, B2>>::VOut

Output value proxies, including newly produced values, valid throughout a window.
Source§

type RIn = <B as ProxyReduceBackend<T, B1, B2>>::RIn

Diff type presented for the input.
Source§

type ROut = <B as ProxyReduceBackend<T, B1, B2>>::ROut

Diff type of the output.
Source§

fn begin(&mut self, description: Description<T>)

Initiate a session to create batches for these descriptions, which span [lower, upper). Read more
Source§

fn next_window( &mut self, instance: &ReduceInstance<'_, T, B1, B2>, changed: &[Self::Key], from: &mut KeyPosition<Self::Key>, window: &mut ReduceWindow<T, Self::RIn, Self::ROut, Self::Key, Self::VIn, Self::VOut>, )

Present the next window of the key space, and advance from past it. Read more
Source§

fn reduce_corrections( &mut self, keys: &[Self::Key], in_ends: &[usize], input: &[(Self::VIn, Self::RIn)], out_ends: &[usize], output: &[(Self::VOut, Self::ROut)], ) -> (Vec<(Self::VOut, Self::ROut)>, Vec<usize>)

A wave of input-output reconciliation, in which the backend supplies necessary edits. Read more
Source§

fn emit(&mut self, records: &[((Self::Key, Self::VOut), T, Self::ROut)])

Commit a collection of updates to the batch in progress.
Source§

fn finish(&mut self) -> Option<B2>

Complete the session matching begin, yielding the batch it described, or None when the span it described carries no updates.

Auto Trait Implementations§

§

impl<B, T> Freeze for BackendFrontier<B, T>
where B: Freeze, Antichain<T>: Freeze,

§

impl<B, T> RefUnwindSafe for BackendFrontier<B, T>

§

impl<B, T> Send for BackendFrontier<B, T>
where B: Send, Antichain<T>: Send,

§

impl<B, T> Sync for BackendFrontier<B, T>
where B: Sync, Antichain<T>: Sync,

§

impl<B, T> Unpin for BackendFrontier<B, T>
where B: Unpin, Antichain<T>: Unpin,

§

impl<B, T> UnsafeUnpin for BackendFrontier<B, T>

§

impl<B, T> UnwindSafe for BackendFrontier<B, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.