{"record":{"id":"851892a7bed32995","repo":"prestodb/presto","slug":"iceberg-invalid-metadata-851892","errorCode":"ICEBERG_INVALID_METADATA","errorMessage":"Cannot read manifest files. Manifests may be written by a newer Iceberg version.","messagePattern":"Cannot read manifest files\\. Manifests may be written by a newer Iceberg version\\.","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java","lineNumber":226,"sourceCode":"\n                Partition partition = partitions.get(partitionWrapper);\n                partition.incrementFileCount();\n                partition.incrementRecordCount(dataFile.recordCount());\n                partition.incrementSize(dataFile.fileSizeInBytes());\n                partition.updateMin(toMap(dataFile.lowerBounds()), dataFile.nullValueCounts(), dataFile.recordCount());\n                partition.updateMax(toMap(dataFile.upperBounds()), dataFile.nullValueCounts(), dataFile.recordCount());\n                partition.updateNullCount(dataFile.nullValueCounts());\n            }\n\n            return partitions;\n        }\n        catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n        catch (RuntimeException e) {\n            // Catch Avro-specific exceptions that may occur during manifest deserialization\n            if (isAvroException(e)) {\n                throw new PrestoException(ICEBERG_INVALID_METADATA,\n                        \"Cannot read manifest files. Manifests may be written by a newer Iceberg version.\", e);\n            }\n            throw e;\n        }\n    }\n\n    private RecordCursor buildRecordCursor(Map<StructLikeWrapper, Partition> partitions, List<PartitionField> partitionFields)\n    {\n        List<Type> partitionTypes = partitionTypes(partitionFields);\n        List<? extends Class<?>> partitionColumnClass = partitionTypes.stream()\n                .map(type -> type.typeId().javaClass())\n                .collect(toImmutableList());\n        int columnCounts = partitionColumnTypes.size() + 3 + columnMetricTypes.size();\n\n        ImmutableList.Builder<List<Object>> records = ImmutableList.builder();\n\n        for (Partition partition : partitions.values()) {\n            List<Object> row = new ArrayList<>(columnCounts);","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java#L208-L244","documentation":"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.","triggerScenarios":"Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}