apache/iceberg · error · UnsupportedOperationException
Unsupported table change: DropWatermark.
Error message
Unsupported table change: DropWatermark.
What it means
applySchemaChanges rejects TableChange.DropWatermark with UnsupportedOperationException; the Iceberg schema update machinery exposed through the Flink catalog cannot express watermark removal as a table change.
Source
Thrown at flink/v2.3/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
- Skip the DROP WATERMARK clause in migration scripts targeting Iceberg tables.
- Manage watermarks in the Flink job/source definitions rather than table metadata.
- Wrap the alter call and translate unsupported changes into no-ops only if your application semantics allow it.
Defensive patterns
Strategy: validation
Validate before calling
if (changes.stream().anyMatch(c -> c instanceof TableChange.DropWatermark)) { throw new IllegalArgumentException('DROP WATERMARK is unsupported on Iceberg tables'); } Try / catch
try { catalog.alterTable(tableIdent, changes); } catch (UnsupportedOperationException e) { LOG.info('Ignoring unsupported DROP WATERMARK for Iceberg table'); } Prevention
- Exclude watermark changes from automated DDL migrations to Iceberg
- Keep watermark semantics in Flink pipeline definitions
- Handle unsupported changes explicitly rather than blanket-retrying
When it happens
Trigger: Executing 'ALTER TABLE ... DROP WATERMARK' against a table accessed via the Iceberg Flink catalog.
Common situations: Cleaning up DDL originally written for Flink's native catalogs and replaying it against Iceberg tables; automated migration scripts that include watermark clauses.
Related errors
- Unsupported table change: AddWatermark.
- Unsupported table change: ModifyWatermark.
- Unsupported table change: DropConstraint.
- Unsupported table change: AddWatermark.
- Unsupported table change: ModifyWatermark.
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/9fdee5b40ea5238f.
Report an issue: GitHub.