{"record":{"id":"f3af7f4b0f778469","repo":"apache/iceberg","slug":"the-given-table-change-is-not-a-property-change-f3af7f","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.3/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.3/flink/src/main/java/org/apache/iceberg/flink/util/FlinkAlterTableUtil.java#L177-L213","documentation":"FlinkAlterTableUtil.applyPropertyChanges only accepts TableChange.SetOption and TableChange.ResetOption. Any other change reaching this method is not a table-property change and throws UnsupportedOperationException. It is an internal routing guard so non-property changes are never misapplied as properties.","triggerScenarios":"Passing a schema or column change into the property-application path, typically a misrouting bug or a caller that collected mixed changes and fed all of them to applyPropertyChanges.","commonSituations":"Custom catalog code reusing the utility with heterogeneous TableChange lists; a refactor that split applySchemaChanges/applyPropertyChanges incorrectly.","solutions":["Filter the change list to only TableChange.SetOption/ResetOption before calling applyPropertyChanges.","Route schema changes through applySchemaChanges instead.","Inspect the change object type before dispatch."],"exampleFix":"// before\nFlinkAlterTableUtil.applyPropertyChanges(update, allChanges);\n// after\nFlinkAlterTableUtil.applyPropertyChanges(update, allChanges.stream()\n    .filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption)\n    .collect(Collectors.toList()));","handlingStrategy":"validation","validationCode":"// java\nboolean allPropertyChanges = changes.stream().allMatch(c ->\n    c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption);\nif (!allPropertyChanges) { throw new IllegalArgumentException(\"non-property change in property path\"); }","typeGuard":"boolean isPropertyChange(TableChange c) {\n  return c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption;\n}","tryCatchPattern":"try {\n  FlinkAlterTableUtil.applyPropertyChanges(update, changes);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().startsWith(\"The given table change is not a property change\")) {\n    // dispatch to schema-change path instead\n  } else { throw e; }\n}","preventionTips":["Partition mixed change lists by type before dispatching.","Route only SetOption/ResetOption through the property path.","Unit-test change routing when reusing this utility."],"tags":["flink","unsupported-operation","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-23T08:17:48.524Z"}