{"record":{"id":"84e3489e2b894871","repo":"apache/iceberg","slug":"the-given-table-change-is-not-a-property-change-84e348","errorCode":null,"errorMessage":"The given table change is not a property change: ","messagePattern":"The given table change is not a property change: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/util/FlinkAlterTableUtil.java","lineNumber":195,"sourceCode":"  }\n\n  /**\n   * Applies a list of Flink table property changes to an {@link UpdateProperties} operation.\n   *\n   * @param pendingUpdate an uncommitted UpdateProperty operation to configure\n   * @param propertyChanges a list of Flink table changes\n   */\n  public static void applyPropertyChanges(\n      UpdateProperties pendingUpdate, List<TableChange> propertyChanges) {\n    for (TableChange change : propertyChanges) {\n      if (change instanceof TableChange.SetOption) {\n        TableChange.SetOption setOption = (TableChange.SetOption) change;\n        pendingUpdate.set(setOption.getKey(), setOption.getValue());\n      } else if (change instanceof TableChange.ResetOption) {\n        TableChange.ResetOption resetOption = (TableChange.ResetOption) change;\n        pendingUpdate.remove(resetOption.getKey());\n      } else {\n        throw new UnsupportedOperationException(\n            \"The given table change is not a property change: \" + change);\n      }\n    }\n  }\n\n  private static void applyModifyColumn(\n      UpdateSchema pendingUpdate, TableChange.ModifyColumn modifyColumn) {\n    if (modifyColumn instanceof TableChange.ModifyColumnName) {\n      TableChange.ModifyColumnName modifyName = (TableChange.ModifyColumnName) modifyColumn;\n      pendingUpdate.renameColumn(modifyName.getOldColumnName(), modifyName.getNewColumnName());\n    } else if (modifyColumn instanceof TableChange.ModifyColumnPosition) {\n      TableChange.ModifyColumnPosition modifyPosition =\n          (TableChange.ModifyColumnPosition) modifyColumn;\n      applyModifyColumnPosition(pendingUpdate, modifyPosition);\n    } else if (modifyColumn instanceof TableChange.ModifyPhysicalColumnType) {\n      TableChange.ModifyPhysicalColumnType modifyType =\n          (TableChange.ModifyPhysicalColumnType) modifyColumn;\n      Type type = FlinkSchemaUtil.convert(modifyType.getNewType().getLogicalType());","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/util/FlinkAlterTableUtil.java#L177-L213","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before\napplyPropertyChanges(update, allChanges);\n// after\nList<TableChange> propChanges = allChanges.stream()\n    .filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption)\n    .collect(Collectors.toList());\napplyPropertyChanges(update, propChanges);","handlingStrategy":"type-guard","validationCode":"boolean allPropertyChanges = changes.stream().allMatch(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption);\nif (!allPropertyChanges) throw new IllegalArgumentException(\"applyPropertyChanges requires SetOption/ResetOption only\");","typeGuard":"static boolean isPropertyChange(TableChange c) {\n  return c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption;\n}","tryCatchPattern":"try { FlinkAlterTableUtil.applyPropertyChanges(update, changes); }\ncatch (UnsupportedOperationException e) {\n  if (e.getMessage().startsWith(\"The given table change is not a property change\")) { /* re-route change */ }\n  throw e;\n}","preventionTips":["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"],"tags":["flink","iceberg","unsupported-operation","table-properties"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}