{"record":{"id":"a016eb0e1291dea5","repo":"prestodb/presto","slug":"iceberg-invalid-metadata","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/FilesTable.java","lineNumber":207,"sourceCode":"                if (checkNonNull(dataFile.keyMetadata(), pagesBuilder)) {\n                    pagesBuilder.appendVarbinary(Slices.wrappedBuffer(dataFile.keyMetadata()));\n                }\n                if (checkNonNull(dataFile.splitOffsets(), pagesBuilder)) {\n                    pagesBuilder.appendBigintArray(dataFile.splitOffsets());\n                }\n                if (checkNonNull(dataFile.equalityFieldIds(), pagesBuilder)) {\n                    pagesBuilder.appendIntegerArray(dataFile.equalityFieldIds());\n                }\n                pagesBuilder.endRow();\n            }\n        }\n        catch (IOException e) {\n            throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, \"Failed to read table files\", 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        // Validate that we successfully read files if manifests exist\n        // Check snapshot summary to avoid false positives on legitimately empty tables\n        if (manifestCount > 0 && fileCount == 0) {\n            long expectedFileCount = 0;\n            if (icebergTable.currentSnapshot() != null) {\n                Map<String, String> summary = icebergTable.currentSnapshot().summary();\n                try {\n                    expectedFileCount = Long.parseLong(summary.getOrDefault(\"total-data-files\", \"0\"));\n                }\n                catch (NumberFormatException e) {\n                    throw new PrestoException(ICEBERG_INVALID_METADATA,\n                            format(\"Invalid total-data-files value in snapshot summary: %s\", summary.get(\"total-data-files\")), e);\n                }","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java#L189-L225","documentation":"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.","triggerScenarios":"Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"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"}