apache/iceberg · error · UnsupportedOperationException
Cannot read unknown manifest type: %s
Error message
Cannot read unknown manifest type: %s
What it means
ManifestFiles.open() dispatches on the manifest's content type and only handles DATA and DELETES manifests. Any other ManifestContent value (or null from a stale/older reader that does not know the type) falls through to this UnsupportedOperationException.
Source
Thrown at core/src/main/java/org/apache/iceberg/ManifestFiles.java:424
*
* @param manifestData the binary data.
* @return a {@link ManifestFile}. To be precise, it's a {@link GenericManifestFile} which don't
* expose to public.
* @throws IOException if encounter any IO error when decoding.
*/
public static ManifestFile decode(byte[] manifestData) throws IOException {
return AvroEncoderUtil.decode(manifestData);
}
static ManifestReader<?> open(
ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
switch (manifest.content()) {
case DATA:
return ManifestFiles.read(manifest, io, specsById);
case DELETES:
return ManifestFiles.readDeleteManifest(manifest, io, specsById);
}
throw new UnsupportedOperationException(
"Cannot read unknown manifest type: " + manifest.content());
}
static ManifestFile copyAppendManifest(
int formatVersion,
int specId,
InputFile toCopy,
Map<Integer, PartitionSpec> specsById,
EncryptedOutputFile outputFile,
long snapshotId,
SnapshotSummary.Builder summaryBuilder) {
// use metadata that will add the current snapshot's ID for the rewrite
// read first_row_id as null because this copies the incoming manifest before commit
InheritableMetadata inheritableMetadata = InheritableMetadataFactory.forCopy(snapshotId);
try (ManifestReader<DataFile> reader =
new ManifestReader<>(
toCopy, specId, specsById, inheritableMetadata, null, FileType.DATA_FILES)) {
return copyManifestInternal(View on GitHub (pinned to 86d9c8fc54)
Solutions
- Upgrade the Iceberg library to one that understands the manifest content type in the table
- Verify the manifest list file was not produced/corrupted by external tooling
- If integrating with custom code, map unknown content types explicitly instead of relying on the switch fallthrough
Example fix
// before
ManifestReader<?> reader = ManifestFiles.open(manifest, io, specsById);
// after
if (manifest.content() == null) {
throw new IllegalArgumentException("Unknown manifest content, upgrade iceberg to read: " + manifest.location());
}
ManifestReader<?> reader = ManifestFiles.open(manifest, io, specsById); Defensive patterns
Strategy: validation
Validate before calling
if (manifest.content() != ManifestContent.DATA && manifest.content() != ManifestContent.DELETES) {
throw new IllegalStateException("Unrecognized manifest content " + manifest.content() + "; upgrade iceberg");
} Type guard
boolean isOpenable(ManifestFile m) { return m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES; } Try / catch
try {
reader = ManifestFiles.open(manifest, io, specsById);
} catch (UnsupportedOperationException e) {
throw new IllegalStateException("Manifest content unknown to this client version: " + manifest.location(), e);
} Prevention
- Keep clients on versions that support the table's format version
- Do not consume manifest lists with external tools that drop enum fields
- Handle null content() defensively when reading forward-compatible data
When it happens
Trigger: Calling ManifestFiles.open(manifest, io, specsById) where manifest.content() is not DATA or DELETES — typically a manifest whose content enum was written by a newer spec version or whose content field is missing/unparseable.
Common situations: Reading manifests written by a newer Iceberg version introducing a new content type; reading manifest list entries where the content field was dropped by forward-compatibility rules (unknown enum values become null in older clients).
Related errors
- Unsupported file content type: ${file.content()}
- Unsupported delete granularity: <granularity>
- Unknown delete file content:
- Cannot apply unknown unique constraint:
- %s doesn't implement copyWithStats
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/04bbf8917a4d05b7.
Report an issue: GitHub.