DATABASES Signal 149
Pipelined SQL in ClickHouse 26.8
ClickHouse 26.8 introduces a |> operator that allows developers to write SQL queries as a sequential pipeline of transformations, which the engine translates into optimized nested subqueries before execution.
This syntax makes complex queries easier to build and inspect incrementally, replacing nested subqueries or CTEs with a top-down flow. Since ClickHouse optimizes the translated query as a whole, there is no performance penalty from the intermediate stages. It is currently limited to ClickHouse and requires version 26.8 or later.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
ClickHouse 26.8 introduces a |> operator to chain SQL transformations like filtering, aggregating, and sorting in a readable sequence.
The EXTEND keyword adds calculated columns to the pipeline while retaining all existing columns from the previous stage.
Pipelined queries are converted into standard nested SQL before execution and optimized as a single unit without materializing intermediate results.
THE CLUSTER
↗