risingwave_batch::executor

Type Alias JoinHashMap

source
pub type JoinHashMap<K> = HashMap<K, RowId, PrecomputedBuildHasher, MonitoredGlobalAlloc>;
Expand description

In JoinHashMap, we only save the row id of the first build row that has the hash key. In fact, in the build side there may be multiple rows with the same hash key. To handle this case, we use ChunkedData to link them together. For example:

idkeyrow
01(1, 2, 3)
14(4, 5, 6)
21(1, 3, 7)
31(1, 3, 2)
43(3, 2, 1)

The corresponding join hash map is:

keyvalue
10
41
34

And we save build rows with the same key like this:

idvalue
02
1None
23
3None
4None

This can be seen as an implicit linked list. For convenience, we use RowIdIter to iterate all build side row ids with the given key.

Aliased Typeยง

struct JoinHashMap<K> { /* private fields */ }