{"record":{"id":"1dc92b586dc669ba","repo":"apache/iceberg","slug":"unsupported-manifest-content-type-1dc92b","errorCode":null,"errorMessage":"Unsupported manifest content type:","messagePattern":"Unsupported manifest content type:","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java","lineNumber":436,"sourceCode":"    }\n\n    public CloseableIterator<FileInfo> entries(ManifestFileBean manifest) {\n      ManifestContent content = manifest.content();\n      FileIO io = table.getValue().io();\n      Map<Integer, PartitionSpec> specs = table.getValue().specs();\n      List<String> proj = ImmutableList.of(DataFile.FILE_PATH.name(), DataFile.CONTENT.name());\n\n      switch (content) {\n        case DATA:\n          return CloseableIterator.transform(\n              ManifestFiles.read(manifest, io, specs).select(proj).iterator(),\n              ReadManifest::toFileInfo);\n        case DELETES:\n          return CloseableIterator.transform(\n              ManifestFiles.readDeleteManifest(manifest, io, specs).select(proj).iterator(),\n              ReadManifest::toFileInfo);\n        default:\n          throw new IllegalArgumentException(\"Unsupported manifest content type:\" + content);\n      }\n    }\n\n    static FileInfo toFileInfo(ContentFile<?> file) {\n      return new FileInfo(file.location(), file.content().toString());\n    }\n  }\n}\n","sourceCodeStart":418,"sourceCodeEnd":445,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java#L418-L445","documentation":"When planning a Spark action, manifests are read by content type: DATA manifests via ManifestFiles.read, DELETES via readDeleteManifest. Any other ManifestContent has no reader path and throws IllegalArgumentException, protecting against silently skipping unknown manifest kinds.","triggerScenarios":"Running a Spark action (rewriteDataFiles, compute stats, etc.) against a table containing manifests whose content type is neither DATA nor DELETES — e.g. new manifest kinds introduced by a newer spec version.","commonSituations":"Reading tables written by a newer Iceberg version with an older Spark runtime on the classpath; corrupted or hand-edited metadata assigning unexpected content values.","solutions":["Upgrade the Iceberg Spark runtime to a version handling the manifest content type","Remove/repair the offending manifests (e.g. via expireSnapshots on a compatible runtime)","Confirm no mixed Iceberg versions between catalog and executor"],"exampleFix":"// before\nthrow new IllegalArgumentException(\"Unsupported manifest content type:\" + content);\n// after\n// upgrade runtime that supports the new ManifestContent before this default branch fires","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { SparkActions.get(spark).deleteOrphanFiles(table)...execute(); }\ncatch (IllegalArgumentException e) {\n  if (e.getMessage().startsWith(\"Unsupported manifest content type\")) { /* upgrade runtime */ }\n  else throw e;\n}","preventionTips":["Keep Spark runtime >= writer Iceberg version","Do not hand-edit metadata files","Expire old manifests with a compatible runtime before upgrading readers"],"tags":["spark","manifest","actions"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}