pub fn hkey(v: &Value) -> Option<HKey>Expand description
The bucket a value belongs to, or None when the value can never match.
NULL returns None: every comparison against NULL is UNKNOWN, and
UNKNOWN does not join, so a NULL-keyed row is set aside rather than
bucketed.
Worth being precise about what that buys, because it is NOT correctness.
Giving NULL an ordinary bucket was tried as a deliberate mutation and the
differential suite still passed — the confirm step evaluates NULL = NULL
to UNKNOWN and drops the pair regardless. Setting NULLs aside avoids
building one enormous bucket of rows that can never match. Correctness
rests on the no-false-negatives property, not on this.
A numeric-looking STRING deliberately buckets with numbers, because
1 = '1' is TRUE here. Two different numeric strings therefore share a
bucket even though they are not equal to each other — the confirm step
rejects that pair, and no correct match is lost.