v.20.9Improvement

Change Version Column Type in VersionedCollapsingMergeTree with ALTER Query

Now it's possible to change the type of version column for VersionedCollapsingMergeTree with ALTER query. #15442 (alesapin).
Allows changing the data type of the version column in VersionedCollapsingMergeTree tables using the ALTER query.

Why it matters

This feature enables users to modify the version column's type in VersionedCollapsingMergeTree tables without recreating the table or losing data. It improves flexibility and ease of schema evolution for tables that rely on versioning for data collapsing.

How to use it

Use the ALTER TABLE statement with the appropriate syntax to change the type of the version column in a VersionedCollapsingMergeTree table. For example:

ALTER TABLE table_name MODIFY COLUMN version_column_name NEW_TYPE