The ClickHouse vs Druid comparison on OctoCounts shows side-by-side source line counts for ClickHouse/ClickHouse and apache/druid, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of ClickHouse/ClickHouse and apache/druid using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-16, ClickHouse/ClickHouse contains 3,446,577 total lines (2,641,612 code) across 11,839 files, while apache/druid contains 1,231,773 total lines (875,253 code) across 7,253 files as of 2026-11-16. ClickHouse/ClickHouse has about 3.0x the counted code lines of apache/druid under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | ClickHouse/ClickHouse | apache/druid |
|---|---|---|
| Files | 11,839 | 7,253 |
| Total lines | 3,446,577 | 1,231,773 |
| Code lines | 2,641,612 | 875,253 |
| Comment lines | 332,372 | 235,726 |
| Blank lines | 472,593 | 120,794 |
| Languages counted | 32 | 29 |
Top languages in ClickHouse/ClickHouse: C++ (64.2% of code), C Header (16.7% of code), GNU Style Assembly (10.3% of code). Top languages in apache/druid: Java (76.8% of code), JSON (7.3% of code), TSX (6.1% of code). C++, C Header, GNU Style Assembly, Python, C appear only in ClickHouse/ClickHouse's top languages; Java, JSON, TSX, TypeScript, XML appear only in apache/druid's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. ClickHouse/ClickHouse was counted at ref master (commit 491b6e93554d) on 2026-11-16; apache/druid was counted at ref master (commit 3a71b1f60869) on 2026-11-16. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. ClickHouse/ClickHouse: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. apache/druid: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: ClickHouse/ClickHouse is the ClickHouse repository: the columnar database server, written predominantly in C++, including a contrib/ tree of vendored third-party libraries compiled into the server. apache/druid is the Druid repository: the distributed analytics datastore, written predominantly in Java, with dependencies pulled at build time rather than vendored in-tree. Both are full database server source trees, counted on the dates shown above.
The per-language tables show the language split directly — C++-dominated on one side, Java-dominated on the other — matching each project's well-known implementation language.
Dependency accounting differs by build tradition: ClickHouse's count includes its vendored contrib/ libraries, while Druid's count covers mostly its own code with external dependencies fetched by its build, so the totals include different amounts of third-party material.
Server repository size says nothing about query performance, compression, or resource use for a given workload; those are properties of the built system and your schema, not of the source tree's line count.
Sources: ClickHouse/ClickHouse repository (C++ columnar database server) · apache/druid repository (Java distributed datastore). Statements verified 2026-09-16.
Evidence and next steps:
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
As of 2026-11-16, ClickHouse/ClickHouse contains 3,446,577 total lines (2,641,612 code) across 11,839 files, while apache/druid contains 1,231,773 total lines (875,253 code) across 7,253 files as of 2026-11-16. ClickHouse/ClickHouse has about 3.0x the counted code lines of apache/druid under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for ClickHouse/ClickHouse, apache/druid, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. ClickHouse/ClickHouse was counted at ref master (commit 491b6e93554d) on 2026-11-16; apache/druid was counted at ref master (commit 3a71b1f60869) on 2026-11-16. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.