Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

ClickHouse Parses SQL by Rewinding One Cursor: A 1,000,000-Backtrack Budget

Oct 20, 2026 14 min read Jay Hubbert

ClickHouse’s SQL parser is a set of combinators that share one position, rewind it on failure, and budget every rewind.

ClickhousePerformanceInternalsParserAst

Read more →

ClickHouse Resolves Identifiers While Parsing: The Table Qualifier Is Only a Guess

Oct 20, 2026 15 min read Jay Hubbert

ClickHouse’s parser unquotes identifiers, splits compound names, guesses the table qualifier and builds parameter nodes before the analyzer runs.

ClickhousePerformanceInternalsParserAstQuery parameters

Read more →

ClickHouse's Aggregate State Lives in an Arena: One Padded Block per Group, Destroyed by Hand

Oct 20, 2026 21 min read Jay Hubbert

ClickHouse aggregate functions own no data; their state lives in a bump-allocated Arena and is destroyed by hand, one contiguous block per group.

ClickhouseInternalsAggregationMemory

Read more →

ClickHouse Builds Aggregate Functions from Name Suffixes: A Decorator Forwards Almost Everything

Oct 20, 2026 19 min read Jay Hubbert

ClickHouse builds new aggregate functions by suffixing names: a factory strips the suffix, recurses into the base function, and wraps it in a decorator.

ClickhouseInternalsAggregationDesign

Read more →

ClickHouse's topK Bounds Its Own Error: Filtered Space-Saving and an O(1) Alpha Map

Oct 20, 2026 20 min read Jay Hubbert

ClickHouse’s topK uses Filtered Space-Saving: each candidate keeps a count and an error bound, and the least accurate counters are dropped when the table overflows.

ClickhouseAlgorithmsInternalsStreaming

Read more →

← Newer Page 44 of 83 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·