Expand description
This module contains implementation for hash key serialization for hash-agg, hash-join, and perhaps other hash-based operators.
There may be multiple columns in one row being combined and encoded into
one single hash key.
For example, SELECT sum(t.a) FROM t GROUP BY t.b, t.c
, the hash keys
are encoded from both t.b
and t.c
. If t.b="abc"
and t.c=1
, the hashkey may be
encoded in certain format of ("abc", 1)
.
Macros§
Structs§
- A wrapper for u64 hash result. Generic over the hasher.
- Null bitmap on heap. We use this for the edge case where group key sizes are larger than 64. This is because group key null bits cannot fit into a u64 on the stack if they exceed 64 bits. NOTE(kwannoel): This is not really optimized as it is an edge case.
- A special hasher designed for
HashKey
, which stores a hash key fromHashKey::hash()
and outputs it onfinish()
. - Null Bitmap on stack. This is specialized for the common case where group keys (<= 64).
Statics§
- This is determined by the stack based data structure we use,
StackNullBitmap
, which can store 64 bits at most.
Traits§
- The deserialization counterpart of
HashKeySer
. - Extension of scalars to be serialized into hash keys.
- We use a trait for
NullBitmap
so we can parameterize structs on it. This is becauseNullBitmap
is used often, and we want it to occupy the minimal stack space.
Type Aliases§
- Hash code from the
Crc32
hasher. Used for hash-shuffle exchange. - Hash code from the
XxHash64
hasher. Used for in-memory hash map cache.