{"record":{"id":"b78028435a913dfc","repo":"apache/iceberg","slug":"unsupported-manifest-type-manifestfile-content-b78028","errorCode":null,"errorMessage":"Unsupported manifest type: ${manifestFile.content()}","messagePattern":"Unsupported manifest type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v4.2/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/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java#L634-L670","documentation":"RewriteTablePathSparkAction.toManifests handles rewriting manifests per ManifestFile.content() (DATA, DELETES); the default branch throws UnsupportedOperationException for any other content type. It guards against manifest content types the rewrite-path logic doesn't know how to relocate.","triggerScenarios":"rewriteManifests() encounters a manifest whose content() is neither DATA nor DELETES — only possible with manifests written under a newer spec/content type than this runtime supports.","commonSituations":"Rewriting the path of a table created/updated by a newer Iceberg release while using an older Spark runtime jar.","solutions":["Upgrade the Spark Iceberg runtime to a version supporting the manifest content type present in the table.","Exclude/rewrite only up to a version whose manifests are all DATA/DELETES.","Rebuild the table from data files into a fresh table at the target location instead of rewriting paths in place."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"boolean safe = table.currentSnapshot().allManifests(table.io()).stream().allMatch(m -> m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES);","typeGuard":"switch (manifestFile.content()) { case DATA -> ...; case DELETES -> ...; default -> handleUnknown(); }","tryCatchPattern":"try { action.execute(); } catch (UnsupportedOperationException e) { if (e.getMessage().startsWith(\"Unsupported manifest type\")) { /* upgrade runtime */ } else throw e; }","preventionTips":["Match runtime version to the writer version before path rewrites","Verify manifest content types before running rewriteTablePath"],"tags":["spark","rewrite-table-path","unsupported-type"],"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"}