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
In PartitionTable.getPartitions, an exception while reading or parsing manifest entries (data files written by a newer Iceberg version with unknown fields/features) is converted to this error, meaning the manifest content cannot be interpreted to compute partition stats.
Source
Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java:226
Partition partition = partitions.get(partitionWrapper);
partition.incrementFileCount();
partition.incrementRecordCount(dataFile.recordCount());
partition.incrementSize(dataFile.fileSizeInBytes());
partition.updateMin(toMap(dataFile.lowerBounds()), dataFile.nullValueCounts(), dataFile.recordCount());
partition.updateMax(toMap(dataFile.upperBounds()), dataFile.nullValueCounts(), dataFile.recordCount());
partition.updateNullCount(dataFile.nullValueCounts());
}
return partitions;
}
catch (IOException e) {
throw new UncheckedIOException(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;
}
}
private RecordCursor buildRecordCursor(Map<StructLikeWrapper, Partition> partitions, List<PartitionField> partitionFields)
{
List<Type> partitionTypes = partitionTypes(partitionFields);
List<? extends Class<?>> partitionColumnClass = partitionTypes.stream()
.map(type -> type.typeId().javaClass())
.collect(toImmutableList());
int columnCounts = partitionColumnTypes.size() + 3 + columnMetricTypes.size();
ImmutableList.Builder<List<Object>> records = ImmutableList.builder();
for (Partition partition : partitions.values()) {
List<Object> row = new ArrayList<>(columnCounts);View on GitHub (pinned to 55bb57d202)
Solutions
- Upgrade Presto to a version compatible with the Iceberg version that wrote the manifests
- Rewrite manifests with a compatible writer (rewrite_manifests) to the supported spec
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java:226 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/851892a7bed32995.
Report an issue: GitHub.