apache/iceberg · error · UnsupportedOperationException
Operation newDelete is not supported after the table is…
Error message
Operation newDelete is not supported after the table is serialized
What it means
SerializableTable exists so an Iceberg table can be serialized to distributed workers for reading; it cannot commit because it holds no catalog reference. newDelete() starts a DeleteFiles commit, so it is overridden to throw UnsupportedOperationException with this message, preventing deletes that would silently never be committed.
Solutions
- Delete via a catalog-backed table: catalog.loadTable(id).newDelete()...commit()
- Run delete commits on the driver; keep executor code limited to reading/producing files
- Use engine-native delete procedures (e.g. Spark DELETE statement on an Iceberg table)
- Guard with table instanceof SerializableTable before initiating deletes
Example fix
// before Table table = serialized; table.newDelete().deleteFromRowFilter(expr).commit(); // after Table table = catalog.loadTable(identifier); table.newDelete().deleteFromRowFilter(expr).commit();
Defensive patterns
Strategy: try-catch
Validate before calling
if (table instanceof org.apache.iceberg.SerializableTable) {
throw new IllegalStateException("newDelete() requires a catalog-backed Table");
} Type guard
boolean canDelete = !(table instanceof org.apache.iceberg.SerializableTable);
Try / catch
try {
table.newDelete().deleteFromRowFilter(expr).commit();
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("not supported after the table is serialized")) {
catalog.loadTable(identifier).newDelete().deleteFromRowFilter(expr).commit();
} else { throw e; }
} Prevention
- Issue deletes from the driver or another catalog-connected context
- Use SQL DELETE via the engine integration for distributed deletes
- Never serialize a Table for jobs that will commit
- Validate table type early in delete-utility code
When it happens
Trigger: Calling table.newDelete() on a deserialized SerializableTable inside a worker task, e.g. row-level delete logic distributed to executors.
Common situations: Custom delete jobs passing a serialized Table to workers; copy-on-write delete helpers built from SerializableTable; refactorings that moved driver-side commit code into executor lambdas.
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
- Operation newAppend is not supported after the table is…
- Operation newOverwrite is not supported after the table is…
- Operation newReplacePartitions is not supported after the…
- Operation newRewrite is not supported after the table is…
- Operation newRowDelta is not supported after the table is…
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/2ae8b31f9de93f06.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/apache/iceberg/SerializableTable.java:407
@Override
public OverwriteFiles newOverwrite() {
throw new UnsupportedOperationException(errorMsg("newOverwrite"));
}
@Override
public RowDelta newRowDelta() {
throw new UnsupportedOperationException(errorMsg("newRowDelta"));
}
@Override
public ReplacePartitions newReplacePartitions() {
throw new UnsupportedOperationException(errorMsg("newReplacePartitions"));
}
@Override
public DeleteFiles newDelete() {
throw new UnsupportedOperationException(errorMsg("newDelete"));
}
@Override
public UpdateStatistics updateStatistics() {
throw new UnsupportedOperationException(errorMsg("updateStatistics"));
}
@Override
public UpdatePartitionStatistics updatePartitionStatistics() {
throw new UnsupportedOperationException(errorMsg("updatePartitionStatistics"));
}
@Override
public ExpireSnapshots expireSnapshots() {
throw new UnsupportedOperationException(errorMsg("expireSnapshots"));
}
@OverrideView on GitHub (pinned to 86d9c8fc54)