Schema evolution feature
You learn that the Impala schema changes when the associated Iceberg table changes. You see examples of changing the schema.
Although you can change the schema of your table over time, you can still read old data files because Iceberg uniquely identifies schema elements. A schema change results in a new metadata.json and a commit, but does not create a new snapshot.
The Iceberg table schema is synchronized with the Impala table schema. A change to the schema of the Iceberg table by an outside entity, such as Spark, changes the corresponding Impala table. You can change the Iceberg table using ALTER TABLE to make the following changes:
- Add a column
- Rename a column
- Drop a column
- Change a column type
- int to long
- float to double
- decimal(P, S) to decimal(P', S) if precision is increased
ALTER TABLE table_name ADD COLUMNS(col_name type[, …]) ALTER TABLE table_name CHANGE COLUMN col_name1 col_name2 type ALTER TABLE table_name DROP COLUMN col_name
ALTER TABLE ice_12 ADD COLUMNS(message STRING, price DECIMAL(8,1)); ALTER TABLE ice_12 DROP COLUMN i; ALTER TABLE ice_12 CHANGE COLUMN s str STRING;