apache/iceberg · error · UnsupportedOperationException
Cannot read unknown manifest type
Error message
Cannot read unknown manifest type: %s
What it means
When planning which manifest columns to scan, BaseScan.switchScanColumns only knows DATA and DELETES manifest content types. An unknown ManifestContent value reaches the switch and throws UnsupportedOperationException. This is a defensive check that should be unreachable with valid snapshots.
Solutions
- Upgrade the Iceberg runtime (all engines) to at least the version that wrote the table
- Align iceberg-spark/flink bundle versions with the writer's version
- Inspect the manifest list for corruption (audit the metadata files)
- If reproducible with a valid table, file a bug with the table's format version and Iceberg versions
Example fix
// before: mixed versions spark --packages org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.2.0 // after: match writer version spark --packages org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.5.2
Defensive patterns
Strategy: type-guard
Validate before calling
ManifestContent content = manifest.content();
if (content != ManifestContent.DATA && content != ManifestContent.DELETES) {
throw new IllegalStateException("unknown manifest content " + content + "; upgrade Iceberg");
} Type guard
boolean knownContent(ManifestContent c) { return c == ManifestContent.DATA || c == ManifestContent.DELETES; } Try / catch
try { table.newScan().planFiles(); } catch (UnsupportedOperationException e) { throw new IllegalStateException("table written by newer Iceberg; upgrade runtime", e); } Prevention
- Pin all engines to the same Iceberg version as the writer
- Upgrade the Iceberg bundle before reading tables written by newer versions
- Validate table metadata after migrations
When it happens
Trigger: A snapshot's manifest list contains a ManifestFile with a content type unknown to this Iceberg version (e.g. reading a table written by a newer Iceberg/spec revision), or a corrupt/hand-crafted manifest list.
Common situations: Version skew: a newer client wrote the table and an older engine/core reads it; rolling upgrades where Spark bundles an older iceberg-core than the writer; corrupted metadata from a bad write.
Related errors
- Unsupported changelog scan task type:
- ALTER VIEW AS is not supported. Use CREATE OR REPLACE VIEW…
- apply(value) is deprecated, use bind(Type).apply(value)
- apply(value) is deprecated, use bind(Type).apply(value)
- AS OF is not supported for changelogs
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/e319abe2209094a3.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/apache/iceberg/BaseScan.java:320
@Override
public ThisT minRowsRequested(long numRows) {
return newRefinedScan(table, schema, context.minRowsRequested(numRows));
}
/**
* Retrieves a list of column names based on the type of manifest content provided.
*
* @param content the manifest content type to scan.
* @return a list of column names corresponding to the specified manifest content type.
*/
static List<String> scanColumns(ManifestContent content) {
switch (content) {
case DATA:
return BaseScan.SCAN_COLUMNS;
case DELETES:
return BaseScan.DELETE_SCAN_COLUMNS;
default:
throw new UnsupportedOperationException("Cannot read unknown manifest type: " + content);
}
}
}
View on GitHub (pinned to 86d9c8fc54)