{"record":{"id":"d6903c2d9d25866f","repo":"apache/iceberg","slug":"unsupported-manifest-type","errorCode":null,"errorMessage":"Unsupported manifest type: ","messagePattern":"Unsupported manifest type: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java","lineNumber":652,"sourceCode":"                  stagingLocation,\n                  format,\n                  sourcePrefix,\n                  targetPrefix));\n          break;\n        case DELETES:\n          result.appendDeleteFile(\n              writeDeleteManifest(\n                  manifestFile,\n                  table,\n                  deltaSnapshotIds,\n                  stagingLocation,\n                  format,\n                  sourcePrefix,\n                  targetPrefix,\n                  rewrittenDeleteFileSizes));\n          break;\n        default:\n          throw new UnsupportedOperationException(\n              \"Unsupported manifest type: \" + manifestFile.content());\n      }\n      return result;\n    };\n  }\n\n  private static RewriteResult<DataFile> writeDataManifest(\n      ManifestFile manifestFile,\n      Broadcast<Table> table,\n      Broadcast<Set<Long>> snapshotIds,\n      String stagingLocation,\n      int format,\n      String sourcePrefix,\n      String targetPrefix) {\n    try {\n      String stagingPath =\n          RewriteTablePathUtil.stagingPath(manifestFile.path(), sourcePrefix, stagingLocation);\n      FileIO io = table.getValue().io();","sourceCodeStart":634,"sourceCodeEnd":670,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java#L634-L670","documentation":"In RewriteTablePathSparkAction.toManifests, each ManifestFile's content() is switched over DATA, DELETES (and other supported types); any unrecognized content falls to default and throws UnsupportedOperationException 'Unsupported manifest type: '. This guards against manifest content types introduced by newer spec versions that the path-rewrite action cannot relocate.","triggerScenarios":"Running rewriteTablePath against a table whose snapshots contain manifests with a content type unknown to this Iceberg build (e.g. written by a newer Iceberg version with an added ManifestContent enum value).","commonSituations":"Cross-version table copies: source written by a newer runtime, older Spark/Iceberg runtime performing the rewrite; mixed writer/reader Iceberg versions in the deployment.","solutions":["Upgrade the Iceberg runtime performing the rewrite to at least the writer's version so the content type is recognized.","Align writer and rewrite-tool Iceberg versions across the deployment.","Exclude or first rewrite with a compatible tool the snapshots containing the unsupported manifests, then copy the rest.","If the content value is unexpected for your versions, report it with the printed value to the Iceberg project."],"exampleFix":"// before\nspark-submit --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.13:1.4.0 rewriteTablePath job on 1.6-written table\n// after\nspark-submit --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.13:<writer-version-or-newer> ...","handlingStrategy":"try-catch","validationCode":"// Check manifest contents are supported before table-path rewrite\nboolean supported = table.snapshots().stream()\n    .flatMap(s -> Arrays.stream(s.allManifests(table.io()).toArray(ManifestFile[]::new)))\n    .allMatch(m -> m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES);","typeGuard":null,"tryCatchPattern":"try {\n  rewriteTablePath.execute();\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().startsWith(\"Unsupported manifest type\")) {\n    throw new IllegalStateException(\"Upgrade the Iceberg runtime used for the rewrite to the writer's version\", e);\n  } else throw e;\n}","preventionTips":["Run table-path rewrites with an Iceberg runtime at least as new as the writer that produced the manifests.","Align Iceberg versions across all clusters that read/write/copy the table.","Test the rewrite on a staging copy before operating on production table locations."],"tags":["spark","rewrite-table-path","manifest-content","version-mismatch"],"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-14T16:17:12.679Z"}