apache/iceberg · error · UnsupportedOperationException

Unsupported manifest type:

Error message

Unsupported manifest type: 

What it means

In RewriteTablePathSparkAction.toManifests, each ManifestFile's content() is switched over DATA, DELETES (and other supported types); any unrecognized content falls to default and throws UnsupportedOperationException 'Unsupported manifest type: '. This guards against manifest content types introduced by newer spec versions that the path-rewrite action cannot relocate.

Source

Thrown at spark/v3.5/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)

Solutions

  1. Upgrade the Iceberg runtime performing the rewrite to at least the writer's version so the content type is recognized.
  2. Align writer and rewrite-tool Iceberg versions across the deployment.
  3. Exclude or first rewrite with a compatible tool the snapshots containing the unsupported manifests, then copy the rest.
  4. If the content value is unexpected for your versions, report it with the printed value to the Iceberg project.

Example fix

// before
spark-submit --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.13:1.4.0 rewriteTablePath job on 1.6-written table
// after
spark-submit --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.13:<writer-version-or-newer> ...
Defensive patterns

Strategy: try-catch

Validate before calling

// Check manifest contents are supported before table-path rewrite
boolean supported = table.snapshots().stream()
    .flatMap(s -> Arrays.stream(s.allManifests(table.io()).toArray(ManifestFile[]::new)))
    .allMatch(m -> m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES);

Try / catch

try {
  rewriteTablePath.execute();
} catch (UnsupportedOperationException e) {
  if (e.getMessage().startsWith("Unsupported manifest type")) {
    throw new IllegalStateException("Upgrade the Iceberg runtime used for the rewrite to the writer's version", e);
  } else throw e;
}

Prevention

When it happens

Trigger: Running rewriteTablePath against a table whose snapshots contain manifests with a content type unknown to this Iceberg build (e.g. written by a newer Iceberg version with an added ManifestContent enum value).

Common situations: Cross-version table copies: source written by a newer runtime, older Spark/Iceberg runtime performing the rewrite; mixed writer/reader Iceberg versions in the deployment.

Related errors


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