Expand description
ART (Adaptive Radix Tree) node types with arena allocation.
Four node sizes matching the C++ ART implementation:
Node4: Up to 4 children — smallest, best for sparse branchesNode16: Up to 16 children — transitions from Node4 at 5 childrenNode48: Up to 48 children — uses indirect index for compact storageNode256: Up to 256 children — full fan-out, direct array
Each node carries:
- A
prefix(compressed path from parent) - A set of
offsets(row IDs stored at this leaf) overflow_offsets(additional row IDs for duplicate keys)
Port of C++ ArtPrimaryKeyIndex::Node from art_index.h (lines 95–145)
and art_index.cpp.
Structs§
- Node
Block - A block of nodes in contiguous memory, used for arena allocation.
Enums§
Constants§
- EMPTY_
MARKER - Marker for unused child slots in Node48’s indirect index.
- NODE4_
MAX - The growth threshold from one node type to the next.
- NODE16_
MAX - NODE48_
MAX - NODE_
BLOCK_ CAPACITY - Maximum number of nodes per arena block.