{"record":{"id":"6d28a54c80bca8d7","repo":"apache/iceberg","slug":"unsupported-manifest-type-manifestfile-content-6d28a5","errorCode":null,"errorMessage":"Unsupported manifest type: {manifestFile.content()}","messagePattern":"Unsupported manifest type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v4.1/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.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java#L634-L670","documentation":"RewriteTablePathSparkAction rewrites manifests from a source table location to a target location. toManifests switches over manifestFile.content() (DATA or DELETES) to route rewriting to the right size map; any other content type has no handling, so the action fails fast with UnsupportedOperationException. This guards against new/unknown manifest content types introduced by newer spec versions being silently dropped.","triggerScenarios":"Calling RewriteTablePathAction/RewriteTablePathSparkAction on a table whose manifest list contains a manifest with a content type other than DATA (0) or DELETES (1), e.g. a future spec extension or a corrupted manifest list file.","commonSituations":"Rewriting a table written by a newer Iceberg version that introduced a new manifest content type; manually edited or corrupted Avro manifest lists; mixing Iceberg versions when copying table data.","solutions":["Upgrade Iceberg to a version that supports the manifest content type present in the table","Verify the table metadata is not corrupted (inspect the manifest list with the Iceberg Avro tools)","If copying from an older deployment, ensure source and target use compatible Iceberg versions","File an issue if a legitimate new manifest type is missing from the switch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"table.scan().manifestsList().forEach(m -> {\n  if (m.content() != ManifestContent.DATA && m.content() != ManifestContent.DELETES) {\n    throw new IllegalStateException(\"Unsupported manifest content: \" + m.content());\n  }\n});","typeGuard":null,"tryCatchPattern":"try {\n  SparkActions.get().rewriteTablePath(table, source, target).execute();\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().contains(\"Unsupported manifest type\")) { /* upgrade Iceberg / inspect manifest list */ }\n  else throw e;\n}","preventionTips":["Keep source and target table Iceberg versions compatible","Inspect manifest list content types before large copy operations","Do not hand-edit Avro manifest lists"],"tags":["spark","table-maintenance","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-23T08:17:48.524Z"}