apache/iceberg · error · UnsupportedOperationException
Unsupported table change: DropWatermark.
Error message
Unsupported table change: DropWatermark.
What it means
Guard in FlinkAlterTableUtil.applySchemaChanges: a DropWatermark table change was received. Since Iceberg schemas have no watermark concept, there is nothing to drop and the change is rejected rather than silently ignored.
Source
Thrown at flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/util/FlinkAlterTableUtil.java:139
* @param schemaChanges a list of Flink table changes
*/
public static void applySchemaChanges(
UpdateSchema pendingUpdate, List<TableChange> schemaChanges) {
for (TableChange change : schemaChanges) {
if (change instanceof TableChange.AddColumn) {
applyAddColumn(pendingUpdate, (TableChange.AddColumn) change);
} else if (change instanceof TableChange.ModifyColumn) {
TableChange.ModifyColumn modifyColumn = (TableChange.ModifyColumn) change;
applyModifyColumn(pendingUpdate, modifyColumn);
} else if (change instanceof TableChange.DropColumn) {
TableChange.DropColumn dropColumn = (TableChange.DropColumn) change;
pendingUpdate.deleteColumn(dropColumn.getColumnName());
} else if (change instanceof TableChange.AddWatermark) {
throw new UnsupportedOperationException("Unsupported table change: AddWatermark.");
} else if (change instanceof TableChange.ModifyWatermark) {
throw new UnsupportedOperationException("Unsupported table change: ModifyWatermark.");
} else if (change instanceof TableChange.DropWatermark) {
throw new UnsupportedOperationException("Unsupported table change: DropWatermark.");
} else if (change instanceof TableChange.AddUniqueConstraint) {
TableChange.AddUniqueConstraint addPk = (TableChange.AddUniqueConstraint) change;
applyUniqueConstraint(pendingUpdate, addPk.getConstraint());
} else if (change instanceof TableChange.ModifyUniqueConstraint) {
TableChange.ModifyUniqueConstraint modifyPk = (TableChange.ModifyUniqueConstraint) change;
applyUniqueConstraint(pendingUpdate, modifyPk.getNewConstraint());
} else if (change instanceof TableChange.DropConstraint) {
throw new UnsupportedOperationException("Unsupported table change: DropConstraint.");
} else {
throw new UnsupportedOperationException("Cannot apply unknown table change: " + change);
}
}
}
private static void applyAddColumn(UpdateSchema pendingUpdate, TableChange.AddColumn addColumn) {
Column flinkColumn = addColumn.getColumn();
Preconditions.checkArgument(
FlinkCompatibilityUtil.isPhysicalColumn(flinkColumn),View on GitHub (pinned to 86d9c8fc54)
Solutions
- Remove the DROP WATERMARK clause from the statement
- Skip watermark changes entirely when migrating to Iceberg (they are implicitly absent)
- Filter the TableChange list before calling applySchemaChanges
Defensive patterns
Strategy: validation
Validate before calling
if (changes.stream().anyMatch(c -> c instanceof TableChange.DropWatermark)) {
throw new IllegalArgumentException("Watermark changes are unsupported on Iceberg tables");
} Try / catch
try {
FlinkAlterTableUtil.applySchemaChanges(table, changes);
} catch (UnsupportedOperationException e) {
// ignore or log: watermark is implicitly absent in Iceberg
} Prevention
- Skip watermark DDL when migrating from Flink-native to Iceberg catalogs
- Pre-filter changes to supported TableChange types
- Treat watermark operations as no-ops for Iceberg
When it happens
Trigger: Executing `ALTER TABLE ... DROP WATERMARK` against an Iceberg-backed Flink table.
Common situations: Cleaning up Flink-specific DDL when switching a table from a Flink-native catalog to Iceberg; schema-sync tooling replaying full table definitions.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unsupported table change: AddWatermark.
- Unsupported table change: ModifyWatermark.
- Creating table with watermark specs is not supported yet.
- Unsupported table change: AddWatermark.
- Unsupported table change: ModifyWatermark.
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/a9a683efe4b68de1.
Report an issue: GitHub.