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
- Upgrade Iceberg to a version whose ManifestContent/manifest enums cover the new content type
- Re-write the manifests with a compatible writer version (e.g. via rewrite_manifests) to use known types
- Filter out manifests with unrecognized content types before adapting if your workload can skip them
- 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
- Keep reader Iceberg version >= writer version across clusters
- Before downgrading Iceberg, rewrite manifests with the older writer
- Validate manifest content types when listing manifests and skip unknown ones when safe
- Watch Iceberg spec announcements for new manifest content types
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
- Cannot apply unsupported transform: %s
- Failed to read manifest file: %s
- Unsupported metadata stats field ID: ${statId}
- v4 manifests are not bound to a single partition spec
- Unknown manifest content: {content}
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/174ea636bb77f519.
Report an issue: GitHub.