v.21.3Improvement

Forbid Dropping Columns Referenced by Materialized Views

Forbid to drop a column if it's referenced by materialized view. Closes #21164. #21303 (flynn).
ClickHouse now prevents dropping columns that are referenced by materialized views.

Why it matters

This feature ensures data consistency and integrity by forbidding the removal of columns currently used in materialized views, avoiding potential runtime errors or broken views.

How to use it

When attempting to drop a column, ClickHouse will automatically check if the column is referenced by any materialized views and block the operation if so. Users must first modify or drop the dependent materialized views before dropping the column.