v.24.2Improvement

Running ALTER COLUMN MATERIALIZE Now Follows Semantics for DEFAULT or MATERIALIZED Expressions

Running ALTER COLUMN MATERIALIZE on a column with DEFAULT or MATERIALIZED expression now precisely follows the semantics. #58023 (Duc Canh Le).
The ALTER COLUMN MATERIALIZE operation now accurately applies to columns with DEFAULT or MATERIALIZED expressions, ensuring correct semantics during materialization.

Why it matters

This feature addresses inconsistencies when running ALTER COLUMN MATERIALIZE on columns defined with DEFAULT or MATERIALIZED expressions. It ensures that the materialization process respects the intended behavior of these expressions, improving data integrity and user experience during schema changes.

How to use it

To use this feature, run the ALTER TABLE statement with ALTER COLUMN <column_name> MATERIALIZE on a column that has a DEFAULT or MATERIALIZED expression. ClickHouse will now correctly materialize the column following the defined semantics.