apache/iceberg · error · UnsupportedOperationException

Unsupported manifest type: ${manifestFile.content()}

Error message

Unsupported manifest type: ${manifestFile.content()}

What it means

RewriteTablePathSparkAction.toManifests rewrites manifest files and handles DATA and DELETES manifest types; any other manifest content hits the default branch and throws UnsupportedOperationException. It is a forward-compatibility guard against manifest content types the rewrite path doesn't know how to copy.

Source

Thrown at spark/v4.0/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. Use a Spark Iceberg runtime version that supports all manifest content types present in the table
  2. Verify manifest content types via table.snapshots() / manifest list inspection
  3. Align writer and rewrite-job Iceberg versions
  4. If reproducible on the latest version, file an issue with the manifest content value

Example fix

// before: older runtime copying manifests written by newer Iceberg
spark.sparkContext().addJar("iceberg-spark-runtime-4.0_2.13-1.4.jar");
// after: upgrade runtime to match/ exceed writer version
spark.sparkContext().addJar("iceberg-spark-runtime-4.0_2.13-1.6.jar");
Defensive patterns

Strategy: validation

Validate before calling

table.snapshots().forEach(s ->
  s.allManifests(table.io()).forEach(m -> {
    if (m.content() != ManifestContent.DATA && m.content() != ManifestContent.DELETES) {
      throw new IllegalStateException("Unsupported manifest type: " + m.content());
    }
  }));

Type guard

if (manifestFile.content() != ManifestContent.DATA && manifestFile.content() != ManifestContent.DELETES) { return null; }

Try / catch

try { action.execute(); } catch (UnsupportedOperationException e) { if (e.getMessage().startsWith("Unsupported manifest type")) { /* upgrade runtime */ } else { throw e; } }

Prevention

When it happens

Trigger: Running rewriteTablePath on a table containing a manifest whose ManifestFile.content() is neither DATA nor DELETES — typically written by a newer Iceberg version with a new manifest content type.

Common situations: Mixed Iceberg versions: table metadata written by a newer writer then copied with an older Spark runtime; corrupted or hand-edited manifest lists.

Related errors


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