Open-Source Wikis

/

ClickHouse

/

Lore

clickhouse/clickhouse

Lore

ClickHouse has been an actively-developed database for a long time. This page sketches the eras the codebase has gone through, the longest-standing features, and the major rewrites visible in the source tree.

Dates are derived from git log of this checkout.

Eras

The Yandex era (Dec 2008 – Jun 2016)

The first commit dates to 2008-12-01. ClickHouse was originally built inside Yandex.Metrica to power web analytics over web-scale clickstream data — hence the name. The engine was internal, the directory was dbms/, and the architecture appears to have already been columnar and MergeTree-based from very early on. This era cemented the core ideas: vectorized execution, sparse primary index, immutable parts merged in the background, and SQL as the user interface.

Open source release (Jun 2016 – 2019)

ClickHouse was open-sourced in June 2016. The next few years are dominated by hardening: more table engines (Distributed, Kafka, MaterializedView), more formats (Native, RowBinary, JSONEachRow, Parquet, CSV, …), the HTTP and native TCP protocols, replication via ZooKeeper, and a fast-growing function library. The Yandex/metrika lineage is still visible in places like tests/queries/0_stateless/, the OpenTelemetry references, and historical dbms/ paths in old commit messages.

Reorganization and Cloud (early 2020 – 2022)

On 2020-04-03 the source tree was reshaped: dbms/ was renamed to src/, making the project structure approachable for outside contributors. Around the same time the build was modernized (CMake + clang only, jemalloc by default) and the function/data-type registries grew rapidly.

On 2021-01-13 the first commits to src/Coordination/ appeared — the start of clickhouse-keeper, an in-process Raft service designed to replace ZooKeeper. By late 2021 it could host real production workloads.

On 2021-08-19 the first commits to src/Backups/ appeared — the declarative BACKUP/RESTORE subsystem.

ClickHouse, Inc. spun out of Yandex in 2021, and the ClickHouse Cloud product followed. The cloud-style separation of compute and storage drove a lot of recent work in src/Disks/DiskObjectStorage/ObjectStorages/ and the disk cache (src/Interpreters/Cache/).

Analyzer rewrite (2022 – 2024)

On 2022-07-14 the first commits to src/Analyzer/ landed (Added Analyzer). Over the next two years the new analyzer/planner pipeline grew alongside the legacy InterpreterSelectQuery path. By 2024 the analyzer had become the default (enable_analyzer=1), correcting many long-standing edge cases in name resolution, joins, and view rewriting. The legacy interpreter still lives in src/Interpreters/InterpreterSelectQuery.cpp but is steadily being deprecated.

In parallel, support for lakehouse formats (Iceberg, DeltaLake, Hudi, Hive) was built under src/Storages/ObjectStorage/, turning ClickHouse into a query engine for open-format data lakes as well as its own MergeTree.

Object storage, vector search, and JSON (2023 – 2026)

Recent eras have introduced:

  • Native object storage as a first-class disk — MergeTree parts can live entirely on S3/Azure with a local cache.
  • Native JSON type — a column type that lazily promotes subkeys to typed subcolumns and supports skip indexes (MergeTreeIndexJSONSubcolumnHelper.cpp).
  • Vector similarity index — approximate nearest-neighbour skip index using usearch/SimSIMD. See MergeTreeIndexVectorSimilarity.h.
  • Text indexes — full-text/inverted skip indexes (MergeTreeIndexBloomFilterText.cpp, MergeTreeIndexConditionText.cpp, TextIndexUtils.cpp) with token-aware matching.
  • Parallel replicas — splitting a single query across replicas of a shard for more parallelism.
  • Lightweight updates and deletes — the _row_exists mask and patch parts (ReplicatedMergeTreeSinkPatch.cpp).
  • AI integration helpers — under src/Functions/AI/ and the vendored contrib/ai-sdk-cpp.

Longest-standing features

  • MergeTree — present essentially since day one. Granularity, sparse primary index, immutable parts merged in the background. The on-disk format is versioned (MergeTreeDataFormatVersion.h) and has gone through several upgrades while staying backward-compatible.
  • The vectorized execution engineBlock, Column, IColumn predate the open-source release and are still the foundation of every operator.
  • The function registryFunctionFactory has accumulated hundreds of functions over a decade. Most have been there for years.
  • HTTP and native TCP protocols — both are pre-open-source. The native protocol has had careful, backward-compatible evolution.

Deprecated and replaced subsystems

  • ZooKeeper as the only coordinator → clickhouse-keeper. ZooKeeper is still supported as a coordination backend, but new deployments use Keeper, and Keeper is what the project develops most actively.
  • The legacy interpreter (InterpreterSelectQuery) → Analyzer + Planner. Both still exist; the analyzer is the future. New optimizations land in src/Analyzer/Passes/ and src/Planner/.
  • Old MongoDB legacy driver (StorageMongoDBPocoLegacy.cpp) is now an empty file; replaced by the modern StorageMongoDB.
  • Old code-browser tooling. The previous home-grown code browser was retired in favour of GitHub's Web UI; only the README link remains.

Major rewrites visible in the tree

Rewrite Approx period Trace
dbms/src/ reorganization Apr 2020 The first commit to src/ is "dbms/ → src/".
Analyzer / Planner Jul 2022 → 2024 src/Analyzer/, src/Planner/.
Native Keeper Jan 2021 → 2022 src/Coordination/.
Object storage as a disk 2021 → ongoing src/Disks/ObjectStorages/, src/Storages/ObjectStorage/.
Backups subsystem Aug 2021 → ongoing src/Backups/.
In-memory parts (briefly explored) Apr 2020 git log src/Storages/MergeTree shows commits "in-memory parts: preparation". The feature was later removed.

Growth trajectory

The codebase has roughly doubled in size from the open-source release in 2016 to today (≈335k lines of .cpp in src/). Submodule count climbed past 250 as the project absorbed Iceberg/Delta/Hudi readers, Arrow Flight, gRPC, vector libraries, and more sanitizer support. Contributor count has grown proportionally — the founder Alexey Milovidov is still by far the top committer, but dozens of long-tail contributors push features and fixes weekly.

The project has shipped a versioned monthly release for many years (the README mentions the 26.2 community call), with weekly minor releases and an LTS track. CI runs in a custom in-house framework called Praktika (ci/praktika/) that reports back to GitHub.

For the lighter-weight history — naming origins, oldest surviving code — see Fun facts.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – ClickHouse wiki | Factory