{"record":{"id":"d004d95e0c813d58","repo":"prestodb/presto","slug":"iceberg-unknown-manifest-type","errorCode":"ICEBERG_UNKNOWN_MANIFEST_TYPE","errorMessage":"Unknown manifest file content: %s","messagePattern":"Unknown manifest file content: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/procedure/RemoveOrphanFiles.java","lineNumber":230,"sourceCode":"                true);\n\n        try {\n            return hdfsEnvironment.getFileSystem(hdfsContext, location);\n        }\n        catch (Exception e) {\n            throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, format(\"Error getting file system at path %s\", location), e);\n        }\n    }\n\n    private static ManifestReader<? extends ContentFile<?>> readerForManifest(Table table, ManifestFile manifest)\n    {\n        switch (manifest.content()) {\n            case DATA:\n                return ManifestFiles.read(manifest, table.io());\n            case DELETES:\n                return ManifestFiles.readDeleteManifest(manifest, table.io(), table.specs());\n            default:\n                throw new PrestoException(ICEBERG_UNKNOWN_MANIFEST_TYPE, \"Unknown manifest file content: \" + manifest.content());\n        }\n    }\n}\n","sourceCodeStart":212,"sourceCodeEnd":234,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/procedure/RemoveOrphanFiles.java#L212-L234","documentation":"ICEBERG_UNKNOWN_MANIFEST_TYPE thrown by readerForManifest when a ManifestFile's content() is neither DATA nor DELETES. The switch covers only the known Iceberg manifest content types, so an unrecognized enum value means a manifest written by a newer/unknown Iceberg spec version.","triggerScenarios":"remove_orphan_files reading manifests where manifest.content() returns a value outside {DATA, DELETES} — practically only possible with manifests produced by a newer Iceberg library introducing a new content type.","commonSituations":"Table written/upgraded by a newer Iceberg runtime or engine with a manifest content type this Presto build doesn't know; mixed engine versions writing to the same table.","solutions":["Upgrade Presto/Iceberg to a version whose Iceberg library recognizes the manifest content type","Check which engine/version wrote the unknown manifests; align Iceberg library versions","Quarantine or rewrite manifests using a compatible Iceberg tool before re-running cleanup"],"exampleFix":"// before\npresto-iceberg built against iceberg 0.x that only knows DATA/DELETES\n// after\nUpgrade presto-iceberg dependency to an Iceberg version supporting the new manifest content type","handlingStrategy":"type-guard","validationCode":"// Reject manifests with unknown content types before cleanup\nboolean knownType = manifests.stream().allMatch(m ->\n    m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES);","typeGuard":"boolean hasKnownManifestContent(ManifestFile m) {\n    return m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES;\n}","tryCatchPattern":"try {\n    CALL system.remove_orphan_files(...)\n} catch (PrestoException e) {\n    if (\"ICEBERG_UNKNOWN_MANIFEST_TYPE\".equals(e.getErrorCode().getName())) {\n        // upgrade Presto/Iceberg or rewrite manifests with a compatible writer\n    }\n}","preventionTips":["Keep the Iceberg library version in Presto >= the version used by all writers to the table","Avoid mixed engine versions writing to the same Iceberg table","Pin and test engine upgrades together with table format writer upgrades"],"tags":["iceberg","manifest","compatibility","version-mismatch"],"backgroundTag":"invalid-enum-value","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"}