Expand description
Factorized vector for avoiding Cartesian product materialization.
A FactorizedVector can represent data in two states:
- Flat: One value per logical row (same as
ValueVector) - Unflat: Multiple values per parent row, with offset arrays tracking boundaries
This enables multi-hop graph traversals without duplicating source columns.
§Example
For a 2-hop traversal where node A has neighbors [B1, B2] and node A’ has neighbor [B3]:
Flat representation (current):
Row 0: (A, B1)
Row 1: (A, B2)
Row 2: (A', B3)
-> 3 rows, A duplicated twice
Factorized representation:
Level 0 (flat): [A, A'] (2 values)
Level 1 (unflat): [B1, B2, B3] (3 values)
Offsets: [0, 2, 3] (A's neighbors at 0..2, A's at 2..3)
-> 5 values total, no duplicationStructs§
- Factorized
Vector - A vector that can represent nested/repeated values without duplication.
- Unflat
Metadata - Metadata for unflat vectors.
Enums§
- Factorized
State - The factorization state of a vector.