v.24.2Improvement
Running ALTER COLUMN MATERIALIZE Now Follows Semantics for DEFAULT or MATERIALIZED Expressions
RunningALTER COLUMN MATERIALIZEon a column withDEFAULTorMATERIALIZEDexpression now precisely follows the semantics. #58023 (Duc Canh Le).
Why it matters
This feature addresses inconsistencies when runningALTER 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 theALTER 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.