apache/iceberg · error · UnsupportedOperationException

Unsupported manifest type

Error message

Unsupported manifest type: {manifestFile.content()}

What it means

RewriteTablePathSparkAction rewrites manifests from a source table location to a target location. toManifests switches over manifestFile.content() (DATA or DELETES) to route rewriting to the right size map; any other content type has no handling, so the action fails fast with UnsupportedOperationException. This guards against new/unknown manifest content types introduced by newer spec versions being silently dropped.

Solutions

  1. Upgrade Iceberg to a version that supports the manifest content type present in the table
  2. Verify the table metadata is not corrupted (inspect the manifest list with the Iceberg Avro tools)
  3. If copying from an older deployment, ensure source and target use compatible Iceberg versions
  4. File an issue if a legitimate new manifest type is missing from the switch
Defensive patterns

Strategy: validation

Validate before calling

table.scan().manifestsList().forEach(m -> {
  if (m.content() != ManifestContent.DATA && m.content() != ManifestContent.DELETES) {
    throw new IllegalStateException("Unsupported manifest content: " + m.content());
  }
});

Try / catch

try {
  SparkActions.get().rewriteTablePath(table, source, target).execute();
} catch (UnsupportedOperationException e) {
  if (e.getMessage().contains("Unsupported manifest type")) { /* upgrade Iceberg / inspect manifest list */ }
  else throw e;
}

Prevention

When it happens

Trigger: Calling RewriteTablePathAction/RewriteTablePathSparkAction on a table whose manifest list contains a manifest with a content type other than DATA (0) or DELETES (1), e.g. a future spec extension or a corrupted manifest list file.

Common situations: Rewriting a table written by a newer Iceberg version that introduced a new manifest content type; manually edited or corrupted Avro manifest lists; mixing Iceberg versions when copying table data.

Related errors


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

Appendix: source

Thrown at spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java:652

                  stagingLocation,
                  format,
                  sourcePrefix,
                  targetPrefix));
          break;
        case DELETES:
          result.appendDeleteFile(
              writeDeleteManifest(
                  manifestFile,
                  table,
                  deltaSnapshotIds,
                  stagingLocation,
                  format,
                  sourcePrefix,
                  targetPrefix,
                  rewrittenDeleteFileSizes));
          break;
        default:
          throw new UnsupportedOperationException(
              "Unsupported manifest type: " + manifestFile.content());
      }
      return result;
    };
  }

  private static RewriteResult<DataFile> writeDataManifest(
      ManifestFile manifestFile,
      Broadcast<Table> table,
      Broadcast<Set<Long>> snapshotIds,
      String stagingLocation,
      int format,
      String sourcePrefix,
      String targetPrefix) {
    try {
      String stagingPath =
          RewriteTablePathUtil.stagingPath(manifestFile.path(), sourcePrefix, stagingLocation);
      FileIO io = table.getValue().io();

View on GitHub (pinned to 86d9c8fc54)