{"record":{"id":"67479b06afc9d901","repo":"apache/iceberg","slug":"unsupported-content","errorCode":null,"errorMessage":"Unsupported content: ","messagePattern":"Unsupported content: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/DeleteFileIndex.java","lineNumber":554,"sourceCode":"      PartitionMap<EqualityDeletes> eqDeletesByPartition = PartitionMap.create(specsById);\n      PartitionMap<PositionDeletes> posDeletesByPartition = PartitionMap.create(specsById);\n      Map<String, PositionDeletes> posDeletesByPath = Maps.newHashMap();\n      Map<String, DeleteFile> dvByPath = Maps.newHashMap();\n\n      for (DeleteFile file : files) {\n        switch (file.content()) {\n          case POSITION_DELETES:\n            if (ContentFileUtil.isDV(file)) {\n              add(dvByPath, file);\n            } else {\n              add(posDeletesByPath, posDeletesByPartition, file);\n            }\n            break;\n          case EQUALITY_DELETES:\n            add(globalDeletes, eqDeletesByPartition, file, fieldLookup);\n            break;\n          default:\n            throw new UnsupportedOperationException(\"Unsupported content: \" + file.content());\n        }\n        ScanMetricsUtil.indexedDeleteFile(scanMetrics, file);\n      }\n\n      return new DeleteFileIndex(\n          globalDeletes.isEmpty() ? null : globalDeletes,\n          eqDeletesByPartition.isEmpty() ? null : eqDeletesByPartition,\n          posDeletesByPartition.isEmpty() ? null : posDeletesByPartition,\n          posDeletesByPath.isEmpty() ? null : posDeletesByPath,\n          dvByPath.isEmpty() ? null : dvByPath,\n          specsById.isEmpty() ? null : specsById);\n    }\n\n    private void add(Map<String, DeleteFile> dvByPath, DeleteFile dv) {\n      String path = dv.referencedDataFile();\n      DeleteFile existingDV = dvByPath.putIfAbsent(path, dv);\n      if (existingDV != null) {\n        throw new ValidationException(","sourceCodeStart":536,"sourceCodeEnd":572,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java#L536-L572","documentation":"When building the DeleteFileIndex, each delete file is dispatched by its FileContent. POSITION_DELETES and EQUALITY_DELETES are handled; any other content (which should not appear in a delete index) hits the default branch and throws UnsupportedOperationException with the file's content value.","triggerScenarios":"Constructing DeleteFileIndex.build with a delete manifest entry whose content is DATA (0) or an unknown/invalid content value — e.g. corrupt metadata, wrong manifest passed in, or a spec-version mismatch producing misread content.","commonSituations":"Corrupted or hand-edited manifests; custom catalog tooling writing invalid content values; reading metadata written by a nonconformant producer.","solutions":["Find the offending file/content value in the message and inspect its manifest.","Regenerate or rewrite the affected manifest with valid delete content values.","Ensure only delete manifests (position/equality) are passed to the delete index.","Validate metadata producers — content must be 1 or 2 for delete files."],"exampleFix":"// before\nindex.addFiles(dataManifestEntries); // includes DATA files\n// after\nindex.addFiles(entries.filter(e -> e.file().content() != FileContent.DATA));","handlingStrategy":"validation","validationCode":"entries.forEach(e -> Preconditions.check(\n    e.file().content() == FileContent.POSITION_DELETES || e.file().content() == FileContent.EQUALITY_DELETES,\n    \"non-delete content in delete index: \" + e.file().content()));","typeGuard":null,"tryCatchPattern":"try { DeleteFileIndex idx = DeleteFileIndex.buildFor(...); } catch (UnsupportedOperationException e) {\n  LOG.error(\"bad content value\", e);\n  throw e;\n}","preventionTips":["Only feed delete manifests to DeleteFileIndex.","Validate metadata written by external tools (content must be 1 or 2).","Guard against metadata corruption with round-trip tests."],"tags":["delete-files","enum","index"],"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"}