apache/iceberg · error · UnsupportedOperationException
The given table change is not a property change
Error message
The given table change is not a property change: {change} What it means
applyPropertyChanges only accepts TableChange.SetOption and TableChange.ResetOption; any other change passed to it throws UnsupportedOperationException. It is a type-narrowing guard: callers must pre-filter to property changes only.
Solutions
- Route schema changes to applySchemaChanges and only SetOption/ResetOption to applyPropertyChanges
- Filter the change list with instanceof TableChange.SetOption || instanceof TableChange.ResetOption before calling
Example fix
// before util.applyPropertyChanges(table, allChanges); // after List<TableChange> props = allChanges.stream().filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption).collect(Collectors.toList()); util.applyPropertyChanges(table, props);
Defensive patterns
Strategy: type-guard
Validate before calling
List<TableChange> props = changes.stream() .filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption) .collect(Collectors.toList()); FlinkAlterTableUtil.applyPropertyChanges(table, props);
Type guard
boolean isPropertyChange(TableChange c) {
return c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption;
} Try / catch
try {
FlinkAlterTableUtil.applyPropertyChanges(table, changes);
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("not a property change")) { /* reroute to applySchemaChanges */ }
throw e;
} Prevention
- Partition changes by kind (property vs schema) before dispatching to the util methods
- Write unit tests that route each TableChange subtype to the correct handler
When it happens
Trigger: Calling applyPropertyChanges with a schema change such as TableChange.AddColumn or any non-property TableChange.
Common situations: Catalog code that collects ALTER TABLE changes into one list and misroutes schema changes into the property handler.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- errMsg(variant, "double")
- errMsg(variant, "int")
- errMsg(variant, "long")
- errMsg(variant, "timestamp")
- Failed to read Variant
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/e41f935b3cfaa178.
Report an issue: GitHub.
Appendix: source
Thrown at flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/util/FlinkAlterTableUtil.java:195
}
/**
* Applies a list of Flink table property changes to an {@link UpdateProperties} operation.
*
* @param pendingUpdate an uncommitted UpdateProperty operation to configure
* @param propertyChanges a list of Flink table changes
*/
public static void applyPropertyChanges(
UpdateProperties pendingUpdate, List<TableChange> propertyChanges) {
for (TableChange change : propertyChanges) {
if (change instanceof TableChange.SetOption) {
TableChange.SetOption setOption = (TableChange.SetOption) change;
pendingUpdate.set(setOption.getKey(), setOption.getValue());
} else if (change instanceof TableChange.ResetOption) {
TableChange.ResetOption resetOption = (TableChange.ResetOption) change;
pendingUpdate.remove(resetOption.getKey());
} else {
throw new UnsupportedOperationException(
"The given table change is not a property change: " + change);
}
}
}
private static void applyModifyColumn(
UpdateSchema pendingUpdate, TableChange.ModifyColumn modifyColumn) {
if (modifyColumn instanceof TableChange.ModifyColumnName) {
TableChange.ModifyColumnName modifyName = (TableChange.ModifyColumnName) modifyColumn;
pendingUpdate.renameColumn(modifyName.getOldColumnName(), modifyName.getNewColumnName());
} else if (modifyColumn instanceof TableChange.ModifyColumnPosition) {
TableChange.ModifyColumnPosition modifyPosition =
(TableChange.ModifyColumnPosition) modifyColumn;
applyModifyColumnPosition(pendingUpdate, modifyPosition);
} else if (modifyColumn instanceof TableChange.ModifyPhysicalColumnType) {
TableChange.ModifyPhysicalColumnType modifyType =
(TableChange.ModifyPhysicalColumnType) modifyColumn;
Type type = FlinkSchemaUtil.convert(modifyType.getNewType().getLogicalType());View on GitHub (pinned to 86d9c8fc54)