apache/iceberg · error · UnsupportedOperationException

Operation rewriteManifests is not supported after the table

Error message

Operation rewriteManifests is not supported after the table is serialized

What it means

SerializableTable wraps table metadata and FileIO so a table can be used for reads in distributed tasks, but it cannot commit metadata changes because it has no catalog connection. rewriteManifests() is a metadata-mutating operation, so it is overridden to throw UnsupportedOperationException with this message.

Source

Thrown at core/src/main/java/org/apache/iceberg/SerializableTable.java:387

  @Override
  public UpdateLocation updateLocation() {
    throw new UnsupportedOperationException(errorMsg("updateLocation"));
  }

  @Override
  public AppendFiles newAppend() {
    throw new UnsupportedOperationException(errorMsg("newAppend"));
  }

  @Override
  public RewriteFiles newRewrite() {
    throw new UnsupportedOperationException(errorMsg("newRewrite"));
  }

  @Override
  public RewriteManifests rewriteManifests() {
    throw new UnsupportedOperationException(errorMsg("rewriteManifests"));
  }

  @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

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Use catalog.loadTable(identifier).rewriteManifests() so commits go through the catalog
  2. Run manifest rewriting on the driver where the live Table is available
  3. Return rewrite results from workers and apply the commit driver-side via the original table
  4. Add an explicit check (table instanceof SerializableTable) that fails fast with a clearer message

Example fix

// before
Table table = deserializedTable; // SerializableTable
table.rewriteManifests().execute();
// after
Table table = catalog.loadTable(identifier);
table.rewriteManifests().execute();
Defensive patterns

Strategy: try-catch

Validate before calling

if (table instanceof org.apache.iceberg.SerializableTable) {
  throw new IllegalStateException("rewriteManifests() requires a catalog-backed Table");
}

Type guard

boolean canCommit = !(table instanceof org.apache.iceberg.SerializableTable);

Try / catch

try {
  table.rewriteManifests().execute();
} catch (UnsupportedOperationException e) {
  if (e.getMessage().contains("not supported after the table is serialized")) {
    catalog.loadTable(identifier).rewriteManifests().execute();
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling table.rewriteManifests() on a deserialized SerializableTable inside a worker task, e.g. building a custom manifest compaction job.

Common situations: Distributed manifest compaction implemented by shipping the Table across the wire; refactoring driver code into executors; helper utilities that accept Table and are fed a SerializableTable.

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


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/1a341df75a3011e6. Report an issue: GitHub.