{"record":{"id":"9e1b65cab9bef9c2","repo":"apache/iceberg","slug":"unsupported-manifest-type-manifestfile-content","errorCode":null,"errorMessage":"Unsupported manifest type: ${manifestFile.content()}","messagePattern":"Unsupported manifest type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v4.0/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.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java#L634-L670","documentation":"RewriteTablePathSparkAction.toManifests rewrites manifest files and handles DATA and DELETES manifest types; any other manifest content hits the default branch and throws UnsupportedOperationException. It is a forward-compatibility guard against manifest content types the rewrite path doesn't know how to copy.","triggerScenarios":"Running rewriteTablePath on a table containing a manifest whose ManifestFile.content() is neither DATA nor DELETES — typically written by a newer Iceberg version with a new manifest content type.","commonSituations":"Mixed Iceberg versions: table metadata written by a newer writer then copied with an older Spark runtime; corrupted or hand-edited manifest lists.","solutions":["Use a Spark Iceberg runtime version that supports all manifest content types present in the table","Verify manifest content types via table.snapshots() / manifest list inspection","Align writer and rewrite-job Iceberg versions","If reproducible on the latest version, file an issue with the manifest content value"],"exampleFix":"// before: older runtime copying manifests written by newer Iceberg\nspark.sparkContext().addJar(\"iceberg-spark-runtime-4.0_2.13-1.4.jar\");\n// after: upgrade runtime to match/ exceed writer version\nspark.sparkContext().addJar(\"iceberg-spark-runtime-4.0_2.13-1.6.jar\");","handlingStrategy":"validation","validationCode":"table.snapshots().forEach(s ->\n  s.allManifests(table.io()).forEach(m -> {\n    if (m.content() != ManifestContent.DATA && m.content() != ManifestContent.DELETES) {\n      throw new IllegalStateException(\"Unsupported manifest type: \" + m.content());\n    }\n  }));","typeGuard":"if (manifestFile.content() != ManifestContent.DATA && manifestFile.content() != ManifestContent.DELETES) { return null; }","tryCatchPattern":"try { action.execute(); } catch (UnsupportedOperationException e) { if (e.getMessage().startsWith(\"Unsupported manifest type\")) { /* upgrade runtime */ } else { throw e; } }","preventionTips":["Use an Iceberg runtime that is at least as new as the writer that produced the table","Check manifest content types before running rewriteTablePath on externally produced tables","Keep writer and rewrite job Iceberg versions aligned"],"tags":["spark","manifests","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"}