pub(super) fn lookup_join_hashmap(
build_hashmap: &dyn JoinHashMapType,
build_side_values: &[ArrayRef],
probe_side_values: &[ArrayRef],
null_equality: NullEquality,
hashes_buffer: &[u64],
limit: usize,
offset: (usize, Option<u64>),
) -> Result<(UInt64Array, UInt32Array, Option<(usize, Option<u64>)>)>Expand description
Executes lookups by hash against JoinHashMap and resolves potential hash collisions. Returns build/probe indices satisfying the equality condition, along with (optional) starting point for next iteration.
ยงExample
For LEFT.b1 = RIGHT.b2:
LEFT (build) Table:
a1 b1 c1
1 1 10
3 3 30
5 5 50
7 7 70
9 8 90
11 8 110
13 10 130RIGHT (probe) Table:
a2 b2 c2
2 2 20
4 4 40
6 6 60
8 8 80
10 10 100
12 10 120The result is
"+----+----+-----+----+----+-----+",
"| a1 | b1 | c1 | a2 | b2 | c2 |",
"+----+----+-----+----+----+-----+",
"| 9 | 8 | 90 | 8 | 8 | 80 |",
"| 11 | 8 | 110 | 8 | 8 | 80 |",
"| 13 | 10 | 130 | 10 | 10 | 100 |",
"| 13 | 10 | 130 | 12 | 10 | 120 |",
"+----+----+-----+----+----+-----+"And the result of build and probe indices are:
Build indices: 4, 5, 6, 6
Probe indices: 3, 3, 4, 5