{"record":{"id":"92cfa44be254d6bc","repo":"apache/beam","slug":"unknown-delete-file-content","errorCode":null,"errorMessage":"Unknown delete file content: {}","messagePattern":"Unknown delete file content: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/cdc/DeleteReader.java","lineNumber":97,"sourceCode":"      boolean needRowPosCol,\n      PreloadedDeletes preloadedDeletes) {\n    this.filePath = filePath;\n    this.preloadedDeletes = preloadedDeletes;\n\n    ImmutableList.Builder<DeleteFile> posDeleteBuilder = ImmutableList.builder();\n    ImmutableList.Builder<DeleteFile> eqDeleteBuilder = ImmutableList.builder();\n    for (DeleteFile delete : deletes) {\n      switch (delete.content()) {\n        case POSITION_DELETES:\n          LOG.debug(\"Adding position delete file {} to reader\", delete.location());\n          posDeleteBuilder.add(delete);\n          break;\n        case EQUALITY_DELETES:\n          LOG.debug(\"Adding equality delete file {} to reader\", delete.location());\n          eqDeleteBuilder.add(delete);\n          break;\n        default:\n          throw new UnsupportedOperationException(\n              \"Unknown delete file content: \" + delete.content());\n      }\n    }\n\n    this.posDeletes = posDeleteBuilder.build();\n    this.eqDeletes = eqDeleteBuilder.build();\n    this.requiredSchema =\n        fileProjection(tableSchema, expectedSchema, posDeletes, eqDeletes, needRowPosCol);\n    this.posAccessor = requiredSchema.accessorForField(MetadataColumns.ROW_POSITION.fieldId());\n  }\n\n  public Schema requiredSchema() {\n    return requiredSchema;\n  }\n\n  protected abstract StructLike asStructLike(T record);\n\n  protected abstract InputFile getInputFile(String location);","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/cdc/DeleteReader.java#L79-L115","documentation":"DeleteReader's constructor partitions a list of Iceberg DeleteFiles into position deletes and equality deletes using a switch over delete.content(). If the content type is anything other than POSITION_DELETES or EQUALITY_DELETES (e.g. a new content type added in a newer Iceberg version), it throws UnsupportedOperationException. This is a defensive guard against delete file kinds the Beam Iceberg CDC reader cannot process.","triggerScenarios":"Constructing a DeleteReader (directly or via the Iceberg CDC BeamIO reader) with a delete list containing a DeleteFile whose content() is not POSITION_DELETES or EQUALITY_DELETES — for example a DataFileContent.DELETE introduced by a newer Iceberg format/library version.","commonSituations":"Running a Beam pipeline built against an older Iceberg SDK but reading a table written by a newer Iceberg writer that emitted an unsupported delete file content type; mixed-version Iceberg runtime dependencies; corrupted/mislabeled delete file metadata.","solutions":["Check delete.content() before passing DeleteFiles to the DeleteReader and filter to POSITION_DELETES/EQUALITY_DELETES only","Align the Iceberg runtime version used by the Beam pipeline with the version that wrote the table","Upgrade the Beam SDK to a version supporting the delete content type","Log and skip unsupported delete files if the use case tolerates partial reads"],"exampleFix":"// before\nList<DeleteFile> allDeletes = task.deletes();\nDeleteReader<?> reader = buildReader(allDeletes, ...);\n// after\nList<DeleteFile> supported = allDeletes.stream()\n    .filter(d -> d.content() == FileContent.POSITION_DELETES\n              || d.content() == FileContent.EQUALITY_DELETES)\n    .collect(Collectors.toList());\nDeleteReader<?> reader = buildReader(supported, ...);","handlingStrategy":"validation","validationCode":"if (deletes.stream().anyMatch(d -> d.content() != FileContent.POSITION_DELETES\n    && d.content() != FileContent.EQUALITY_DELETES)) {\n  throw new IllegalArgumentException(\"Delete list contains unsupported delete file content\");\n}","typeGuard":"static boolean isSupportedDelete(DeleteFile d) {\n  return d.content() == FileContent.POSITION_DELETES\n      || d.content() == FileContent.EQUALITY_DELETES;\n}","tryCatchPattern":"try {\n  DeleteReader<?> reader = buildReader(deletes, tableSchema, expectedSchema, needRowPos, preloaded);\n} catch (UnsupportedOperationException e) {\n  LOG.error(\"Unsupported delete file content in table reads: {}\", e.getMessage());\n  throw new IOException(\"Incompatible delete files; align Iceberg versions\", e);\n}","preventionTips":["Filter delete files by content type before constructing readers","Keep the Beam and Iceberg runtime versions aligned","Check the Iceberg release notes for new delete content types before upgrading writers"],"tags":["iceberg","cdc","unsupported-delete-file","version-compatibility"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}