v.20.7Improvement

Fix for ALTER command hanging on MergeTree tables without ORDER BY or PARTITION BY

If MergeTree table does not contain ORDER BY or PARTITION BY, it was possible to request ALTER to CLEAR all the columns and ALTER will stuck. Fixed #7941. #12382 (alexey-milovidov).
Fixed an issue where performing ALTER CLEAR on a MergeTree table without ORDER BY or PARTITION BY clauses would cause the ALTER operation to hang indefinitely.

Why it matters

This fix addresses a bug that caused ALTER CLEAR commands to become stuck when executed on MergeTree tables missing ORDER BY and PARTITION BY definitions, improving stability and reliability when modifying such tables.

How to use it

Users can safely perform ALTER ... CLEAR commands on MergeTree tables regardless of whether they have ORDER BY or PARTITION BY clauses defined, without the risk of the command hanging.