{"record":{"id":"e41f935b3cfaa178","repo":"apache/iceberg","slug":"the-given-table-change-is-not-a-property-change-e41f93","errorCode":null,"errorMessage":"The given table change is not a property change: {change}","messagePattern":"The given table change is not a property change: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.1/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.1/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 passed to it throws UnsupportedOperationException. It is a type-narrowing guard: callers must pre-filter to property changes only.","triggerScenarios":"Calling applyPropertyChanges with a schema change such as TableChange.AddColumn or any non-property TableChange.","commonSituations":"Catalog code that collects ALTER TABLE changes into one list and misroutes schema changes into the property handler.","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"],"exampleFix":"// before\nutil.applyPropertyChanges(table, allChanges);\n// after\nList<TableChange> props = allChanges.stream().filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption).collect(Collectors.toList());\nutil.applyPropertyChanges(table, props);","handlingStrategy":"type-guard","validationCode":"List<TableChange> props = changes.stream()\n  .filter(c -> c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption)\n  .collect(Collectors.toList());\nFlinkAlterTableUtil.applyPropertyChanges(table, props);","typeGuard":"boolean isPropertyChange(TableChange c) {\n  return c instanceof TableChange.SetOption || c instanceof TableChange.ResetOption;\n}","tryCatchPattern":"try {\n  FlinkAlterTableUtil.applyPropertyChanges(table, changes);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().contains(\"not a property change\")) { /* reroute to applySchemaChanges */ }\n  throw e;\n}","preventionTips":["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"],"tags":["flink","table-properties","type-mismatch"],"backgroundTag":"invalid-argument-value","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"}