Integrating the Rust Delta Kernel into ClickHouse
ClickHouse replaced its hand-written Delta Lake protocol implementation with the Rust Delta Kernel (delta-kernel-rs). The kernel takes over transaction log parsing, snapshot resolution and data skipping, while ClickHouse keeps its own optimized Parquet reader through the kernel's Engine APIs. Adopting it brought writes, schema evolution via logical/physical schema mapping, time travel, Change Data Feed (exposed in 25.12 through snapshot version settings), and partition and statistics pruning. Embedding a Rust library in ClickHouse's dependency-free C++ binary required nightly Rust for sanitizer builds, crates vendored with cargo-local-registry to avoid network fetch failures, and building the kernel as its own workspace.
Related posts
- How to use Rust in ClickHouse: avoiding a full rewrite
ClickHouse mediumAdept
ClickHouse, a 1.5M-line C++ analytic database, is adopting Rust incrementally rather than rewriting. It started with Corrosion to wire Rust into CMake and a BLAKE3 hash function, then took on a client history-navigation feature, the PRQL query language, and Databricks' delta-kernel-rs for Delta Lake support. The integration problems were mostly practical: hermetic reproducible builds with vendored crates, buggy FFI wrappers caught quickly by existing CI and fuzzing, library panics that crash the server, compiling Rust with sanitizers (now easier with an MSan toolchain), duplicated cross-compilation setup, and transitive dependencies linking system OpenSSL.
- A Year of Rust in ClickHouse
ClickHouse mediumAdept
ClickHouse added Rust to its C++ codebase as an option for new components rather than a rewrite, starting with BLAKE3, then skim for clickhouse-client history, PRQL as a switchable query dialect, and Databricks' delta-kernel-rs replacing a sketchy C++ Delta Lake implementation. The integration needed hermetic builds with vendored crates and careful C++/Rust wrappers. Panics had to be kept from crashing a multi-tenant server, and MSan required instrumenting Rust with a pinned nightly toolchain. Further friction came from cross-compilation, static OpenSSL linking, enormous Rust symbol names, library conventions for memory accounting and connection pools that don't compose with ClickHouse's, and missing build caching, while CI fuzzing caught crashes in the Rust libraries just as it does in C libraries.
- Consuming the Delta Lake Change Data Feed for CDC
ClickHouse mediumAdept
Delta Lake's Change Data Feed (CDF) can drive CDC into ClickHouse by reading row-level change events reconstructed from the _delta_log transaction log and the _change_data Parquet files. Appends appear as add actions with min/max stats used for data skipping. Updates produce update_preimage/update_postimage rows and deletes produce single delete rows. On the ClickHouse side, rows land in a ReplacingMergeTree keyed on _commit_version so background merges resolve the latest state eventually, with FINAL queries for immediate correctness and soft-delete caveats. ClickHouse also releases an MIT-licensed Python reference implementation built on delta-rs and DataFusion that polls version ranges and categorizes CDC/add/remove actions.
- ClickHouse is data lake ready
ClickHouse mediumAdept
ClickHouse now queries Apache Iceberg and Delta Lake tables in place on S3, GCS and Azure, either directly or through catalogs such as AWS Glue, Unity, Polaris, BigLake, OneLake and Iceberg REST. Teams can load lake data into the native MergeTree engine when they need sub-second, high-concurrency queries, and can write results back to open formats. The groundwork took two years of releases: a native Parquet reader with page-level parallelism that reads about 1.8x faster on ClickBench, integration of the Delta Rust Kernel, Iceberg time travel and DML, and parallel replicas. Worked examples against a 1.29-billion-row NYC taxi Iceberg table show in-place scans taking 50 to 130 seconds before ingestion into MergeTree for faster querying.
- Climbing the Iceberg with ClickHouse
ClickHouse mediumAdept
ClickHouse fits into data lake and lakehouse architectures in three common ways: incrementally loading object-storage or Iceberg data via s3cluster/S3Queue (or double-writing from Kafka), running ad-hoc and federated queries against Iceberg, Delta and Hudi tables plus PostgreSQL, MySQL and MongoDB, and frequently querying shared lakehouse datasets. Version 24.12 adds an Iceberg REST catalog database engine, tested with Snowflake's Polaris, so tables can be discovered and queried without explicit paths. Version 24.11 adds icebergS3Cluster for distributed reads, cutting a 96-billion-row scan from about 2,595s to 907s on three nodes. Planned work covers Iceberg partition pruning, schema evolution and time travel, Delta support via the Rust Delta Kernel, and Glue and Unity catalogs.