prestodb/presto · error · PrestoException
ICEBERG_INVALID_METADATA
ICEBERG_INVALID_METADATA
Error message
Cannot read manifest files. Manifests may be written by a newer Iceberg version.
What it means
While iterating manifest entries in FilesTable.buildPages, parsing fails because the manifest files were written by an Iceberg version newer than the connector understands (unknown entry/schema features), so this error tells the user the manifests themselves are unreadable by this build.
Source
Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java:207
if (checkNonNull(dataFile.keyMetadata(), pagesBuilder)) {
pagesBuilder.appendVarbinary(Slices.wrappedBuffer(dataFile.keyMetadata()));
}
if (checkNonNull(dataFile.splitOffsets(), pagesBuilder)) {
pagesBuilder.appendBigintArray(dataFile.splitOffsets());
}
if (checkNonNull(dataFile.equalityFieldIds(), pagesBuilder)) {
pagesBuilder.appendIntegerArray(dataFile.equalityFieldIds());
}
pagesBuilder.endRow();
}
}
catch (IOException e) {
throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, "Failed to read table files", e);
}
catch (RuntimeException e) {
// Catch Avro-specific exceptions that may occur during manifest deserialization
if (isAvroException(e)) {
throw new PrestoException(ICEBERG_INVALID_METADATA,
"Cannot read manifest files. Manifests may be written by a newer Iceberg version.", e);
}
throw e;
}
// Validate that we successfully read files if manifests exist
// Check snapshot summary to avoid false positives on legitimately empty tables
if (manifestCount > 0 && fileCount == 0) {
long expectedFileCount = 0;
if (icebergTable.currentSnapshot() != null) {
Map<String, String> summary = icebergTable.currentSnapshot().summary();
try {
expectedFileCount = Long.parseLong(summary.getOrDefault("total-data-files", "0"));
}
catch (NumberFormatException e) {
throw new PrestoException(ICEBERG_INVALID_METADATA,
format("Invalid total-data-files value in snapshot summary: %s", summary.get("total-data-files")), e);
}View on GitHub (pinned to 55bb57d202)
Solutions
- Upgrade Presto to a version whose bundled Iceberg runtime can parse these manifests
- Regenerate or compact manifests with a compatible Iceberg writer to a supported spec version
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java:207 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/a016eb0e1291dea5.
Report an issue: GitHub.