Skip to content
Opensource internals
  • Posts

Ast

ClickHouse Parses SQL with a Backtracking Recursive-Descent Parser

Oct 25, 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 It Parses

Oct 25, 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 Shares One AST Between Threads

Oct 25, 2026 15 min read Jay Hubbert

The ClickHouse AST is a tree of 32-byte reference-counted nodes with a bit-packed flag word and an iterative destructor.

ClickhousePerformanceInternalsAstParser

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·