clickhouse/clickhouse
Other engines
MergeTree is the workhorse, but ClickHouse ships dozens of other table engines. This page is a catalog of the non-MergeTree engines under src/Storages/.
Distributed and Merge
StorageDistributed(StorageDistributed.cpp, ~90 KB) — a stateless query router. It holds no data; it forwardsSELECT/INSERTto shards in a cluster. Reads emitRemoteSourceprocessors that issue the rewritten sub-query to each shard. Writes either go through the same path (sync) or are queued in a local "sharded" directory and flushed asynchronously. See Distributed queries.StorageMerge(StorageMerge.cpp) — virtual UNION over a set of tables matching a regex. Useful for transparent table sharding.
In-memory and pseudo engines
StorageMemory— rows in RAM. Used for ephemeral tables and as the default engine for the_localdatabase inclickhouse-local.StorageBuffer(StorageBuffer.cpp) — write-through buffer in front of another table. Aggregates inserts in memory and flushes them when thresholds are hit.StorageNull—/dev/nullfor inserts; reads always return zero rows. Used to discard data while keeping triggers (e.g.MATERIALIZED VIEW TO Null()).StorageDummy— placeholder used during analyzer rewrites.StorageDictionary(StorageDictionary.cpp) — table view over a configuredDictionary. See Dictionaries.StorageJoin(StorageJoin.cpp) — a pre-built hash table queryable asjoinGet(...)and reusable across queries.StorageSet(StorageSet.cpp) — a pre-built set forIN-operator reuse.StorageView/StorageMaterializedView— non-materialized and incrementally materialized views. See Materialized views.StorageWindowView(src/Storages/WindowView/) — streaming windowed aggregation.StorageGenerateRandom— produces synthetic rows from a schema. Used in tests and demos.StorageInput— an injection point forclickhouse-local/ external pipelines.StorageLoop— repeats a sub-query infinitely (useful for stream-like demos).StorageExecutable(StorageExecutable.cpp) — runs an external script and reads its stdout.StorageFuzzJSON/StorageFuzzQuery— fuzzers as table engines.
Log family
Log, TinyLog, StripeLog (StorageLog.cpp, StorageStripeLog.cpp) are simple append-only column-stripe formats from before MergeTree. They have no indices and limited concurrency, but they are extremely simple and fast for tiny tables.
Object storage
The directory src/Storages/ObjectStorage/ is the modern object-storage layer. It abstracts S3, Azure, HDFS, and a "local fake" object store behind one set of engines:
S3,AzureBlobStorage,HDFS— read/write tables backed by a bucket with one of the supported file formats (Parquet, ORC, JSON, CSV, …).Iceberg,DeltaLake,Hudi— read tables in those open table formats.*Clustervariants distribute reads across cluster nodes for parallelism.
The reading code lives under src/Storages/ObjectStorage/StorageObjectStorage.cpp, partitioning under src/Storages/HivePartitioningUtils.cpp. The actual transport is IObjectStorage from src/Disks/ObjectStorages/. See Object storage tables.
Streaming engines
Pull-based ingestion engines that hold a consumer thread and stream rows into materialized views:
Kafka(src/Storages/Kafka/) —librdkafka-based consumer.RabbitMQ(src/Storages/RabbitMQ/) —AMQP-CPP-based consumer.NATS(src/Storages/NATS/) —cnats-based consumer.FileLog(src/Storages/FileLog/) — tail a directory of log files.S3Queue,AzureQueue(src/Storages/ObjectStorageQueue/) — newest-file ingestion from a bucket with at-least-once semantics tracked in Keeper.
The shared sink-side code is in src/Storages/MessageQueueSink.cpp and src/Storages/StreamingStorageRegistry.cpp. Each engine pairs with a producer (via IMessageProducer) for INSERT support.
External database engines
Engines that proxy to another database. Reads are translated; writes are forwarded.
StorageMySQL,StoragePostgreSQL,StorageMongoDB,StorageRedis,StorageSQLite— first-class connectors.StorageXDBC(StorageXDBC.cpp) — generic ODBC/JDBC bridge that talks toclickhouse-odbc-bridge/clickhouse-library-bridgeviasrc/BridgeHelper/.
Predicate pushdown for these engines lives in src/Storages/transformQueryForExternalDatabase.cpp and the analyzer-aware variant.
Time series and key-value
StorageTimeSeries(StorageTimeSeries.cpp) — Prometheus-style time series (a tag-aware schema with hash-based grouping).StoragePrometheusQuery— proxy to a Prometheus instance.StorageKeeperMap(StorageKeeperMap.cpp, ~70 KB) — a key-value table whose data lives directly in Keeper. Useful for small dictionaries with strong consistency.src/Storages/RocksDB/— embeddedRocksDB-backed KV table.
Hive
src/Storages/Hive/ provides a reader for tables described in a Hive Metastore. Now largely superseded by Iceberg/DeltaLake engines but still in use.
ArrowFlight
StorageArrowFlight (StorageArrowFlight.cpp) exposes a table over Arrow Flight RPC. The corresponding handler is src/Server/ArrowFlight*.
Smaller helpers
IStorageCluster— the base for*Clustervariants of object-storage engines.StorageProxy.h/StorageTableProxy.h/StorageTableFunction.h— proxy storages used during query rewriting.StorageLoop.cpp— loops a sub-query for streaming demos.StorageFromMergeTreeDataPart.cpp,StorageFromMergeTreeProjection.cpp— tiny "engines" used to read a single part or projection inside the optimizer.
See also
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.