Expand description
Columnar segment binary format definitions.
All multi-byte integers are little-endian. The segment is self-describing: the footer contains all metadata needed to read any column without scanning the entire file.
Structs§
- Block
Stats - Per-block statistics for a single column. Enables predicate pushdown:
skip blocks where
WHERE price > 100and block’smax_price < 100. - Column
Meta - Metadata for a single column within the segment footer.
- Segment
Footer - Segment footer: contains all metadata needed to read any column.
- Segment
Header - Segment header: identifies the file as a NodeDB columnar segment.
Constants§
- BLOCK_
SIZE - Rows per block. Each block is independently compressed and decompressible. 1024 balances compression ratio (larger = better) vs random access granularity (smaller = less waste on filtered scans).
- ENDIANNESS_
LE - Endianness marker: 0x01 = little-endian (always LE for NodeDB).
- HEADER_
SIZE - Size of the segment header in bytes: magic(4) + major(1) + minor(1) + endianness(1) = 7.
- MAGIC
- Magic bytes identifying a NodeDB columnar segment.
- VERSION_
MAJOR - Current format major version. Readers reject segments with higher major.
- VERSION_
MINOR - Current format minor version. Readers tolerate segments with same major but higher minor (unknown footer fields are ignored).