pub fn join_events<'a, L, R, Res>(
events_l: &'a [&PersistedLogEntry],
events_r: &'a [&PersistedLogEntry],
predicate: impl Fn(L, R, u64) -> Option<Res> + 'a,
) -> impl Iterator<Item = Res> + 'a
Expand description
Joins two sets of events on a predicate.
This function computes a “nested loop join” by first computing the cross product of the start event vector and the success/failure event vectors. The resulting cartesian product is then filtered according to the join predicate supplied in the parameters.
This function is intended for small data sets. If the data set relations grow, this function should implement a different join algorithm or be moved out of the gateway.