Expand description
Range-join operators.
Range-join is a form of non-equi join where each key in the left operand matches a contiguous range of keys in the right operand.
Consider two indexed Z-sets z1 and z2, a function range_func that
maps a key in z1 to a half-closed interval of keys [lower, upper) in
z2 and another function join_func that, given (k1, v1) in z1 and
(k2, v2) in z2, returns an iterable collection c of output values.
The range-join operator works as follows:
- For each
k1inz1, find all keys inz2within the half-closed intervaljoin_range(k1). - For each
((k1, v1), w1)inz1and((k2, v2), w2)inz2wherek2 ∈ join_range(k1), add all values injoin_func(k1,v1,k2,v2)to the output batch with weightw1 * w2.