Partition evolution feature

Evolving a partition means changing it without rewriting data files. To evolve an Iceberg partition from Hive or Impala, you learn to use ALTER to change identity partitions. By setting a partition spec for an identity transformation partition, you alter the table.

You use the SET PARTITION SPEC clause in an ALTER statement to change the identity partition for a table. A partition spec change results in a new metadata.json and a commit, but does not create a new snapshot.

Hive or Impala syntax

ALTER TABLE table_name SET PARTITION SPEC ([col_name][, spec(value)][, spec(value)]...)]
  • spec

    The specification for a transform listed in the next topic, "Partition transform feature".

Hive or Impala examples

ALTER TABLE t 
SET PARTITION SPEC ( TRUNCATE(5, level), HOUR(event_time), 
BUCKET(15, message), price);

ALTER TABLE ice_p
SET PARTITION SPEC (VOID(i), VOID(d), TRUNCATE(3, s), HOUR(t), i);