v.22.2New Feature

EPHEMERAL Column Specifier Added to CREATE TABLE Query

EPHEMERAL column specifier is added to CREATE TABLE query. Closes #9436. #34424 (yakov-olkhovskiy).
Added the EPHEMERAL column specifier to the CREATE TABLE query in ClickHouse.

Why it matters

The EPHEMERAL column specifier allows users to define columns that exist only during query execution or session lifetime without storing persistent data. This feature helps reduce storage overhead and optimizes temporary computations within tables.

How to use it

To use the feature, add the EPHEMERAL specifier to a column definition within the CREATE TABLE statement. For example:

CREATE TABLE example_table (
ephemeral_column UInt32 EPHEMERAL,
regular_column String
) ENGINE = MergeTree() ORDER BY regular_column;

This defines ephemeral_column as a transient column that does not persist data on disk.