v.21.11Improvements

Allow Removal of SAMPLE BY Expression in MergeTree Tables

Allow to remove SAMPLE BY expression from MergeTree tables (ALTER TABLE <table> REMOVE SAMPLE BY). #30180 (Anton Popov).
Allow removal of the SAMPLE BY expression from MergeTree tables using an ALTER TABLE query.

Why it matters

This feature enables users to modify MergeTree tables by removing the SAMPLE BY clause without needing to recreate the table. It simplifies schema evolution and improves flexibility when sampling logic is no longer required or needs to be changed.

How to use it

Use the ALTER TABLE <table> REMOVE SAMPLE BY command to remove the SAMPLE BY expression from a MergeTree table. For example:

ALTER TABLE <table_name> REMOVE SAMPLE BY