ClickhouseRyadh Dahimene, Auxten WangAnnouncement
Announcing chDB 4: write Pandas, run ClickHouse, now on Hex
Summary
chDB 4 introduces Data Store, a native component that allows users to write Pandas-like code that executes on the ClickHouse OLAP SQL engine. Standard Pandas workflows suffer from eager execution, excessive memory materialization, and lack of automatic query optimizations. To solve this, Data Store implements a four-layer architecture that lazily records operations as a chain of LazyOp objects and compiles them into optimized ClickHouse SQL plans upon evaluation triggers. When encountering operations unsupported by ClickHouse, the QueryPlanner splits the pipeline into segments, routing tasks between ClickHouse and Pandas while using Python's memoryview to minimize data copying overhead. This release also integrates natively into Hex notebooks.
Context
Standard Pandas executes chained operations eagerly without global query visibility, materializing intermediate DataFrames in memory and inflating dataset sizes during processing, which causes workflows to break down in production data pipelines.
Approach / What changed
chDB 4 adds Data Store, a four-layer lazy execution system that compiles Pandas-style pipelines into optimized ClickHouse SQL and splits operations unsupported by ClickHouse into separate segments routed via Python memoryview buffers.
Takeaways
Data Store records operations lazily and triggers execution only on operations like print(), len(), or .columns, compiling queries with filter pushdown, column pruning, and limit propagation.
chDB avoids full data copies for numeric and fixed-width columns by exposing ClickHouse internal memory buffers directly to Pandas without serialization cycles.
When a Pandas segment sits in the middle of a pipeline, downstream segments operate on intermediate in-memory data and cannot benefit from source-level optimizations like Parquet row-group skipping.
Source and freshness
- Source
- clickhouse.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.