apache/iceberg · error · UnsupportedOperationException
The given table change is not a property change:
Error message
The given table change is not a property change:
What it means
applyPropertyChanges only accepts TableChange.SetOption and TableChange.ResetOption; any other change type passed to it throws this UnsupportedOperationException. It is a routing/type assertion: property-changing logic was handed a schema or other change.
Source
Thrown at flink/v2.2/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)
Solutions
- Verify the change routing: only send TableChange.SetOption/ResetOption instances to applyPropertyChanges
- Split changes with explicit instanceof filters before dispatching
- Catch UnsupportedOperationException and surface which change type was misrouted
Example fix
// before
applyPropertyChanges(update, allChanges);
// after
List<TableChange> propChanges = allChanges.stream()
.filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption)
.collect(Collectors.toList());
applyPropertyChanges(update, propChanges); Defensive patterns
Strategy: type-guard
Validate before calling
boolean allPropertyChanges = changes.stream().allMatch(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption);
if (!allPropertyChanges) throw new IllegalArgumentException("applyPropertyChanges requires SetOption/ResetOption only"); Type guard
static boolean isPropertyChange(TableChange c) {
return c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption;
} Try / catch
try { FlinkAlterTableUtil.applyPropertyChanges(update, changes); }
catch (UnsupportedOperationException e) {
if (e.getMessage().startsWith("The given table change is not a property change")) { /* re-route change */ }
throw e;
} Prevention
- Split incoming TableChange lists into property vs schema buckets with instanceof filters
- Unit-test change-dispatch routing when adding new change types
- Never feed the full unfiltered change list to every handler
When it happens
Trigger: Calling applyPropertyChanges with a mixed list of TableChange objects where at least one is not a SetOption/ResetOption (e.g. an AddColumn slipped into the property-change batch).
Common situations: Custom catalogs or tools splitting incoming changes into schema vs property buckets with faulty instanceof checks; forwarding all changes from a Flink connector to both handlers.
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: DropConstraint.
- Cannot apply unknown modify-column change:
- Cannot apply unknown modify-column-position change:
- Cannot apply unknown unique constraint:
- %s does not implement deleteFile
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/84e3489e2b894871.
Report an issue: GitHub.