apache/iceberg · error · UnsupportedOperationException

Unsupported content type for manifests:

Error message

Unsupported content type for manifests: 

What it means

The legacy ManifestFile adapter maps a v4 manifest's contentType() enum to the two-value ManifestContent (DATA/DELETES). The switch is exhaustive over the known kinds; a default branch throws UnsupportedOperationException in case a future or unexpected content type appears, signaling a spec version the current code doesn't understand.

Source

Thrown at core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:451

    public long length() {
      return file.fileSizeInBytes();
    }

    @Override
    public int partitionSpecId() {
      throw new UnsupportedOperationException(
          "v4 manifests are not bound to a single partition spec");
    }

    @Override
    public ManifestContent content() {
      switch (file.contentType()) {
        case DATA_MANIFEST:
          return ManifestContent.DATA;
        case DELETE_MANIFEST:
          return ManifestContent.DELETES;
        default:
          throw new UnsupportedOperationException(
              "Unsupported content type for manifests: " + file.contentType());
      }
    }

    @Override
    public long sequenceNumber() {
      return file.tracking().dataSequenceNumber();
    }

    @Override
    public long minSequenceNumber() {
      return file.manifestInfo().minSequenceNumber();
    }

    @Override
    public Long snapshotId() {
      return file.tracking().snapshotId();
    }

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Upgrade Iceberg to a version whose ManifestContent/manifest enums cover the new content type
  2. Re-write the manifests with a compatible writer version (e.g. via rewrite_manifests) to use known types
  3. Filter out manifests with unrecognized content types before adapting if your workload can skip them
  4. Inspect the table's metadata/format version to confirm which writer produced the manifests
Defensive patterns

Strategy: try-catch

Validate before calling

boolean knownContentType(ManifestFile mf) {
  return mf.contentType() == FileContent.DATA_MANIFEST
      || mf.contentType() == FileContent.DELETE_MANIFEST;
}

Try / catch

try { content = adapter.content(); }
catch (UnsupportedOperationException e) {
  LOG.warn("Unknown manifest content type {} from newer writer; skipping", e.getMessage());
}

Prevention

When it happens

Trigger: Calling content() on the v4 ManifestFileAdapter when file.contentType() returns a value other than DATA_MANIFEST or DELETE_MANIFEST — e.g. a newly introduced manifest content type from a newer spec, or corrupted/unknown enum value read from the manifest.

Common situations: Reading manifests written by a newer Iceberg release that defines additional manifest content types; forward-compatibility failures where an older reader processes newer metadata; corrupted manifest metadata bytes decoding to an unknown enum.

Related errors


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