Skip to main content

hash_join_two

Function hash_join_two 

Source
pub fn hash_join_two<L, R, T, KL, KR, C, P>(
    left: &[L],
    left_topic: &str,
    key_left: KL,
    right: &[R],
    right_topic: &str,
    key_right: KR,
    combine: C,
    predicate: P,
) -> Vec<T>
where L: RowAccess, R: RowAccess, KL: Fn(&L) -> String, KR: Fn(&R) -> String, C: Fn(&L, &R) -> T, P: Fn(&JoinedRow<'_>) -> Result<bool>,
Expand description

Hash-Join-Helper fuer zwei typed Streams. Iteriert die linke Liste, baut eine HashMap key -> [&L] (Build-Phase), iteriert dann die rechte Liste (Probe-Phase) und erzeugt fuer jedes matchende (L, R)-Paar via combine ein Resultat. Optional wird ein zusaetzliches Predicate via predicate (z.B. MultiTopic::evaluate_joined) auf jedem Paar geprueft.

Spec: §2.2.2.3.4 (MultiTopic) — der Hash-Join ist die idiomatische O(n+m)-Implementation der subscription_expression.