JoinStreamLocalSortMerge

Struct JoinStreamLocalSortMerge 

Source
pub struct JoinStreamLocalSortMerge<Key: Data + Ord, Out1: ExchangeData, Out2: ExchangeData, Keyer1: KeyerFn<Key, Out1>, Keyer2: KeyerFn<Key, Out2>, ShipStrat: ShipStrategy> { /* private fields */ }
Expand description

This is an intermediate type for building a join operator.

The ship strategy has already been selected and it’s stored in ShipStrat, the local strategy is hash and now the join variant has to be selected.

Note that outer join is not supported if the ship strategy is broadcast_right.

Implementations§

Source§

impl<Key: DataKey + Ord, Out1: ExchangeData, Out2: ExchangeData, Keyer1, Keyer2> JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipHash>
where Keyer1: KeyerFn<Key, Out1>, Keyer2: KeyerFn<Key, Out2>,

Source

pub fn inner( self, ) -> KeyedStream<impl Operator<Out = (Key, InnerJoinTuple<Out1, Out2>)>>

Finalize the join operator by specifying that this is an inner join.

Given two stream, create a stream with all the pairs (left item from the left stream, right item from the right), such that the key obtained with keyer1 on an item from the left is equal to the key obtained with keyer2 on an item from the right.

This is an inner join, very similarly to SELECT a, b FROM a JOIN b ON keyer1(a) = keyer2(b).

Note: this operator will split the current block.

Source

pub fn left( self, ) -> KeyedStream<impl Operator<Out = (Key, LeftJoinTuple<Out1, Out2>)>>

Finalize the join operator by specifying that this is a left join.

Given two stream, create a stream with all the pairs (left item from the left stream, right item from the right), such that the key obtained with keyer1 on an item from the left is equal to the key obtained with keyer2 on an item from the right.

This is a left join, meaning that if an item from the left does not find and element from the right with which make a pair, an extra pair (left, None) is generated. If you want to have a right join, you just need to switch the two sides and use a left join.

This is very similar to SELECT a, b FROM a LEFT JOIN b ON keyer1(a) = keyer2(b).

Note: this operator will split the current block.

Source

pub fn outer( self, ) -> KeyedStream<impl Operator<Out = (Key, OuterJoinTuple<Out1, Out2>)>>

Finalize the join operator by specifying that this is an outer join.

Given two stream, create a stream with all the pairs (left item from the left stream, right item from the right), such that the key obtained with keyer1 on an item from the left is equal to the key obtained with keyer2 on an item from the right.

This is a full-outer join, meaning that if an item from the left does not find and element from the right with which make a pair, an extra pair (left, None) is generated. Similarly if an element from the right does not appear in any pair, a new one is generated with (None, right).

This is very similar to SELECT a, b FROM a FULL OUTER JOIN b ON keyer1(a) = keyer2(b).

Note: this operator will split the current block.

Source§

impl<Key: Data + Ord, Out1: ExchangeData, Out2: ExchangeData, Keyer1, Keyer2> JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipBroadcastRight>
where Keyer1: KeyerFn<Key, Out1>, Keyer2: KeyerFn<Key, Out2>,

Source

pub fn inner( self, ) -> Stream<impl Operator<Out = (Key, InnerJoinTuple<Out1, Out2>)>>

Finalize the join operator by specifying that this is an inner join.

Given two stream, create a stream with all the pairs (left item from the left stream, right item from the right), such that the key obtained with keyer1 on an item from the left is equal to the key obtained with keyer2 on an item from the right.

This is an inner join, very similarly to SELECT a, b FROM a JOIN b ON keyer1(a) = keyer2(b).

Note: this operator will split the current block.

Source

pub fn left( self, ) -> Stream<impl Operator<Out = (Key, LeftJoinTuple<Out1, Out2>)>>

Finalize the join operator by specifying that this is a left join.

Given two stream, create a stream with all the pairs (left item from the left stream, right item from the right), such that the key obtained with keyer1 on an item from the left is equal to the key obtained with keyer2 on an item from the right.

This is a left join, meaning that if an item from the left does not find and element from the right with which make a pair, an extra pair (left, None) is generated. If you want to have a right join, you just need to switch the two sides and use a left join.

This is very similar to SELECT a, b FROM a LEFT JOIN b ON keyer1(a) = keyer2(b).

Note: this operator will split the current block.

Auto Trait Implementations§

§

impl<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat> Freeze for JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat>
where Keyer1: Freeze, Keyer2: Freeze,

§

impl<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat> !RefUnwindSafe for JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat>

§

impl<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat> Send for JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat>

§

impl<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat> Sync for JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat>
where Keyer1: Sync, Keyer2: Sync, Key: Sync, ShipStrat: Sync, Out1: Sync, Out2: Sync,

§

impl<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat> Unpin for JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat>
where Keyer1: Unpin, Keyer2: Unpin, Key: Unpin, ShipStrat: Unpin, Out1: Unpin, Out2: Unpin,

§

impl<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat> !UnwindSafe for JoinStreamLocalSortMerge<Key, Out1, Out2, Keyer1, Keyer2, ShipStrat>

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<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.