{"record":{"id":"239b175a945d2c17","repo":"apache/iceberg","slug":"operation-newrowdelta-is-not-supported-after-the-t","errorCode":null,"errorMessage":"Operation newRowDelta is not supported after the table is serialized","messagePattern":"Operation newRowDelta is not supported after the table is serialized","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/SerializableTable.java","lineNumber":397,"sourceCode":"\n  @Override\n  public RewriteFiles newRewrite() {\n    throw new UnsupportedOperationException(errorMsg(\"newRewrite\"));\n  }\n\n  @Override\n  public RewriteManifests rewriteManifests() {\n    throw new UnsupportedOperationException(errorMsg(\"rewriteManifests\"));\n  }\n\n  @Override\n  public OverwriteFiles newOverwrite() {\n    throw new UnsupportedOperationException(errorMsg(\"newOverwrite\"));\n  }\n\n  @Override\n  public RowDelta newRowDelta() {\n    throw new UnsupportedOperationException(errorMsg(\"newRowDelta\"));\n  }\n\n  @Override\n  public ReplacePartitions newReplacePartitions() {\n    throw new UnsupportedOperationException(errorMsg(\"newReplacePartitions\"));\n  }\n\n  @Override\n  public DeleteFiles newDelete() {\n    throw new UnsupportedOperationException(errorMsg(\"newDelete\"));\n  }\n\n  @Override\n  public UpdateStatistics updateStatistics() {\n    throw new UnsupportedOperationException(errorMsg(\"updateStatistics\"));\n  }\n\n  @Override","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/SerializableTable.java#L379-L415","documentation":"SerializableTable supports only reads/scans; commits are impossible because a serialized table has no live catalog connection. newRowDelta() creates a RowDelta operation that must commit metadata, so SerializableTable overrides it to throw UnsupportedOperationException with this message.","triggerScenarios":"Calling table.newRowDelta() on a deserialized SerializableTable in worker code that tries to apply deletes/inserts (e.g. CDC application inside an executor task).","commonSituations":"CDC/upsert jobs distributing a serialized Table to workers; custom row-delta writers built on SerializableTable; migrating driver code into executor lambdas.","solutions":["Apply RowDelta commits through a catalog-backed table: catalog.loadTable(id).newRowDelta()...commit()","Keep commit-producing code on the driver; ship only File handles/DataFiles to workers","Use the engine's native merge/copy-on-write or merge-on-read sinks instead of manual RowDelta in executors","Check table instanceof SerializableTable before issuing write operations to fail fast with clearer diagnostics"],"exampleFix":"// before\nTable table = serialized;\ntable.newRowDelta().addDeletes(deleteFile).commit();\n// after\nTable table = catalog.loadTable(identifier);\ntable.newRowDelta().addDeletes(deleteFile).commit();","handlingStrategy":"try-catch","validationCode":"if (table instanceof org.apache.iceberg.SerializableTable) {\n  throw new IllegalStateException(\"newRowDelta() requires a catalog-backed Table\");\n}","typeGuard":"boolean canCommitDeltas = !(table instanceof org.apache.iceberg.SerializableTable);","tryCatchPattern":"try {\n  table.newRowDelta().addDeletes(df).commit();\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().contains(\"not supported after the table is serialized\")) {\n    catalog.loadTable(identifier).newRowDelta().addDeletes(df).commit();\n  } else { throw e; }\n}","preventionTips":["Apply CDC/RowDelta commits on the driver with a live Table","Distribute only the delete/equality files, not the Table object","Use engine-native merge-on-read/copy-on-write sinks where possible","Check for SerializableTable before any commit operation"],"tags":["java","iceberg","unsupported-operation","serialization"],"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"}