Skip to main content

Module factorized_chunk

Module factorized_chunk 

Source
Expand description

FactorizedChunk - multi-level factorized data representation.

A FactorizedChunk organizes columns into levels, where each level can have different factorization (multiplicity). This avoids materializing the full Cartesian product during multi-hop graph traversals.

§Example

For a 2-hop query MATCH (a)-[e1]->(b)-[e2]->(c):

Level 0 (flat):   [a1, a2]           (2 source nodes)
Level 1 (unflat): [b1, b2, b3, b4]   (4 first-hop neighbors)
                  offsets: [0, 2, 4]  (a1 has 2 neighbors, a2 has 2)
Level 2 (unflat): [c1, c2, ..., c8]  (8 second-hop neighbors)
                  offsets: [0, 2, 4, 6, 8]

Logical rows = 2 * 2 * 2 = 8, but physical storage = 2 + 4 + 8 = 14 values
vs flat storage = 8 * 5 columns = 40 values

Structs§

FactorizationLevel
A factorization level containing columns at the same nesting depth.
FactorizedChunk
A chunk that supports factorized representation across multiple levels.
FactorizedRowIterator
Iterator over logical rows in a factorized chunk.

Enums§

ChunkVariant
A chunk that can be either flat (DataChunk) or factorized (FactorizedChunk).