How ClickHouse Parses CSV in Parallel
ClickHouse splits CSV into row-aligned chunks with a quote-aware scanner, parses them on separate threads, and reorders them with a ticket ring.
ClickHouse splits CSV into row-aligned chunks with a quote-aware scanner, parses them on separate threads, and reorders them with a ticket ring.
ClickHouse’s function factory: static registration, alias maps, and a declarative signature DSL for overload resolution.
UNION ALL merges streams, UNION DISTINCT adds a hash DISTINCT with a self-abandoning preliminary pass, and INTERSECT/EXCEPT filter the left side through a set of the right.
The hashed dictionary packs keys compactly, shards the table for parallel loading, and picks its hash table by measured memory footprint.
The Native format writes a row count, then for each column its name, type, serialization kind and bulk data — never a row.