ClickHouse's Map Column Is a Flat Pair List: Buckets on Disk Make One-Key Reads Cheap
A Map column is an Array(Tuple(keys, values)) with offsets, and since 26.3 its serialization can hash the keys into buckets so m[‘k’] reads one substream.
All posts published on this site.
Everything published here, newest first.
A Map column is an Array(Tuple(keys, values)) with offsets, and since 26.3 its serialization can hash the keys into buckets so m[‘k’] reads one substream.
ClickHouse’s Decimal is an integer with the scale in the type, so arithmetic is a power-of-ten shift — with a silent overflow hole at 128 bits.
Rebuilding a vector from bit planes is a rounding problem: ClickHouse centre-fills the dropped bits, protects the IEEE zero and infinity cells, and turns precision 1 into a …
ClickHouse’s DateTime is Unix seconds plus a time zone that lives in the type, backed by a 146097-day lookup table per zone.
A MergeTree part’s metadata lives in plain text sidecar files next to the data, each written atomically and parsed back at load time.