Modules§
- consistent_
hash 🔒 - dispatcher 🔒
- key 🔒
- This module contains implementation for hash key serialization for hash-agg, hash-join, and perhaps other hash-based operators.
- key_v2 🔒
- marker
- table_
distribution
Structs§
- Actor
Alignment Id - Hash
Code - A wrapper for u64 hash result. Generic over the hasher.
- Hash
KeyImpl - The implementation of the hash key.
- Heap
Null Bitmap - 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.
- Heap
Storage - Key storage that uses a in-heap buffer and key, backed by a boxed slice.
- Precomputed
Build Hasher - Precomputed
Hasher - A special hasher designed for
HashKey, which stores a hash key fromHashKey::hash()and outputs it onfinish(). - Stack
Buffer - The buffer for building a hash key on a fixed-size byte array on the stack.
- Stack
Null Bitmap - Null Bitmap on stack. This is specialized for the common case where group keys (<= 64).
- Stack
Storage - Key storage that uses a on-stack buffer and key, backed by a byte array with length
N. - Virtual
Node VirtualNode(a.k.a. Vnode) is a minimal partition that a set of keys belong to. It is used for consistent hashing.- Vnode
Mapping - Generic mapping from virtual nodes to items.
- Worker
Slot Id
Enums§
- Vnode
Count - The different cases of
maybe_vnode_countfield in the protobuf message.
Statics§
- MAX_
GROUP_ KEYS_ ON_ STACK - This is determined by the stack based data structure we use,
StackNullBitmap, which can store 64 bits at most.
Traits§
- Buffer
- Associated type for
KeyStorageused to build the hash key. - HashKey
- Trait for different kinds of hash keys.
- Hash
KeyDe - The deserialization counterpart of
HashKeySer. - Hash
KeyDispatcher - A trait to help to dynamically dispatch
HashKeytemplate. - Hash
KeySer - Extension of scalars to be serialized into hash keys.
- IsSingleton
- A trait for checking whether a table/fragment is a singleton.
- KeyStorage
- The storage where the hash key resides in memory.
- Null
Bitmap - We use a trait for
NullBitmapso we can parameterize structs on it. This is becauseNullBitmapis used often, and we want it to occupy the minimal stack space. - Vnode
Bitmap Ext - An extension trait for
Bitmapto support virtual node operations. - Vnode
Count Compat - A trait for accessing the vnode count field with backward compatibility.
- Vnode
Mapping Item - Trait for items that can be used as keys in
VnodeMapping.
Functions§
- calc_
hash_ key_ kind - Calculate what kind of hash key should be used given the key data types.
Type Aliases§
- Actor
Alignment Mapping - A mapping from
VirtualNodetoActorAlignmentId. - ActorId
- Actor
Mapping - A mapping from
VirtualNodetoActorId. - AllVirtual
Node Iter - An iterator over all virtual nodes.
- Crc32
Hash Code - Hash code from the
Crc32hasher. Used for hash-shuffle exchange. - Expanded
Actor Alignment - An expanded mapping from
VirtualNodetoActorAlignmentId. - Expanded
Actor Mapping - An expanded mapping from
VirtualNodetoActorId. - Expanded
Mapping - Expanded mapping from virtual nodes to items, essentially a vector of items and can be indexed by virtual nodes.
- Expanded
Worker Slot Mapping - An expanded mapping from
VirtualNodetoWorkerSlotId. - Fixed
Size Key - Key8
- Key16
- Key32
- Key64
- Key128
- Key256
- KeySerialized
- Serialized
Key - Worker
Slot Mapping - A mapping from
VirtualNodetoWorkerSlotId. - XxHash64
Hash Code - Hash code from the
XxHash64hasher. Used for in-memory hash map cache.