apache/iceberg · error · UnsupportedOperationException
Unsupported table change: ModifyWatermark.
Error message
Unsupported table change: ModifyWatermark.
What it means
applySchemaChanges rejects watermark modifications: any TableChange.ModifyWatermark reaching the Iceberg catalog alter path throws UnsupportedOperationException because Iceberg (via this Flink bridge) cannot store watermark table properties.
Source
Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/util/FlinkAlterTableUtil.java:137
*
* @param pendingUpdate an uncommitted UpdateSchema operation to configure
* @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();View on GitHub (pinned to 86d9c8fc54)
Solutions
- Remove the MODIFY WATERMARK statement; redefine the watermark in the consuming Flink job/source DDL instead.
- Drop and recreate the view/source definition with the desired watermark semantics outside Iceberg metadata.
- Check Iceberg release notes for watermark table-feature support before retrying.
Defensive patterns
Strategy: validation
Validate before calling
boolean hasWatermarkChange = changes.stream().anyMatch(c -> c instanceof TableChange.ModifyWatermark || c instanceof TableChange.AddWatermark || c instanceof TableChange.DropWatermark);
if (hasWatermarkChange) throw new IllegalArgumentException('Watermark changes unsupported by Iceberg Flink catalog'); Try / catch
try { catalog.alterTable(tableIdent, changes); } catch (UnsupportedOperationException e) { /* fall back to pipeline-level watermark config */ } Prevention
- Manage watermarks at the job/source level rather than table metadata
- Strip watermark clauses from DDL migration scripts targeting Iceberg
- Check Iceberg release notes for watermark feature support
When it happens
Trigger: Executing 'ALTER TABLE ... MODIFY WATERMARK' (or ALTER ... REPLACE/WATERMARK adjustments) through the Iceberg Flink catalog.
Common situations: Migrating native Flink table DDL workflows to Iceberg tables and reusing watermark DDL statements unchanged.
Related errors
- Unsupported table change: AddWatermark.
- Unsupported table change: DropWatermark.
- 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/0481272ec0a2d39e.
Report an issue: GitHub.