v.1.1.54245New Features

Replicated Query: ALTER TABLE CLEAR COLUMN IN PARTITION

The replicated query ALTER TABLE CLEAR COLUMN IN PARTITION.
Adds support for the replicated query ALTER TABLE CLEAR COLUMN IN PARTITION, allowing users to clear data from a specific column within a specific partition in replicated tables.

Why it matters

This feature was introduced to enable more granular data modification in replicated tables by allowing clearing of data in a specific column of a specific partition without dropping the entire partition or table. It solves the problem of partial data removal in large partitions, improving operational flexibility and reducing the risk of costly full partition manipulations. This enhances ease of maintenance, data cleanup, and resource optimization in distributed environments.

How to use it

Use the query ALTER TABLE [db.]table CLEAR COLUMN column_name IN PARTITION partition_expr to clear all data from the specified column within the given partition on replicated tables. This command is replicated across replicas and ensures consistent state. It is useful for cases where you need to remove column data from only a subset of data (a partition) instead of the entire table or partition.

Example:
ALTER TABLE my_table CLEAR COLUMN some_column IN PARTITION '2023-01-01'