Module path_trie

Module path_trie 

Source
Expand description

Path Trie for TOON Document Path Resolution (Task 4)

Implements O(|path|) path resolution for nested TOON documents, regardless of schema size.

§Performance Analysis

Traditional BTreeMap: O(d × log F) where d=depth, F=fields
Path Trie:           O(d) where d=path depth

For path="users.profile.settings.theme" (d=4) with F=100 fields:
- BTreeMap: 4 × log(100) ≈ 26.6 comparisons
- PathTrie: 4 lookups = 4 hash lookups

§Memory Model

Memory: O(N × avg_path_length) where N = total columns For 100 tables × 50 cols × 3 levels = 15,000 nodes × ~100 bytes = 1.5MB

Structs§

ColumnGroupAffinity
Column group affinity for compression optimization
ConcurrentPathTrie
Concurrent Path Trie with lock-free reads and epoch-based reclamation
ConcurrentTrieNode
A node in the concurrent path trie using epoch-based reclamation
PathTrie
Path Trie for O(|path|) TOON path resolution
ReadGuard
RAII guard for read operations Decrements reader count when dropped
TrieNode
A node in the path trie

Enums§

ColumnType
Column type for physical storage optimization

Type Aliases§

ColumnId
Column identifier (matches storage layer)