{"record":{"id":"5b0fd125aa7e723b","repo":"apache/beam","slug":"unexpected-entry-status-entry-status","errorCode":null,"errorMessage":"Unexpected entry status: ${entry.status()}","messagePattern":"Unexpected entry status: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/iceberg/src/main/java/org/apache/iceberg/BeamBaseIncrementalChangelogScan.java","lineNumber":962,"sourceCode":"                    context.schemaAsString(),\n                    context.specAsString(),\n                    context.residuals());\n\n              case DELETED:\n                // For DELETED data files, attach ALL deletes that were present up to deletion\n                // This includes existing deletes AND deletes added in the scan range\n                DeleteFile[] deletedFileDeletes = getDeletesForDeletedFile(entry, commitSnapshotId);\n                return new BaseDeletedDataFileScanTask(\n                    changeOrdinal,\n                    commitSnapshotId,\n                    dataFile,\n                    deletedFileDeletes,\n                    context.schemaAsString(),\n                    context.specAsString(),\n                    context.residuals());\n\n              default:\n                throw new IllegalArgumentException(\"Unexpected entry status: \" + entry.status());\n            }\n          });\n    }\n\n    /**\n     * Gets delete files that apply to an ADDED data file. Only includes deletes added in the same\n     * snapshot as the file.\n     */\n    private DeleteFile[] getDeletesForAddedFile(\n        ManifestEntry<DataFile> entry, long commitSnapshotId) {\n      DeleteFileIndex addedDeleteIndex = addedDeletesBySnapshot.get(commitSnapshotId);\n      return addedDeleteIndex == null || addedDeleteIndex.isEmpty()\n          ? NO_DELETES\n          : addedDeleteIndex.forEntry(entry);\n    }\n\n    /**\n     * Gets all delete files that were applied to a DELETED data file up to the point it was","sourceCodeStart":944,"sourceCodeEnd":980,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/iceberg/BeamBaseIncrementalChangelogScan.java#L944-L980","documentation":"When building changelog tasks from manifest entries, only a fixed set of entry statuses (EXISTING/ADDED/DELETED) is handled. Any other ManifestEntry.Status value falls into the default branch and throws IllegalArgumentException, indicating an unexpected status from the manifest reader.","triggerScenarios":"A manifest entry carries a status value not anticipated by the switch (e.g. a newer Iceberg added an enum constant, or the reader deserializes a corrupt/unknown status integer).","commonSituations":"Iceberg version mismatch producing an unmapped enum ordinal; corrupted metadata; a Beam version not yet updated for a new Iceberg entry status.","solutions":["Log/inspect entry.status() to see the exact value and check it against the current ManifestEntry.Status enum","Align Beam and Iceberg versions — the enum likely has a constant the Beam module predates","If data corruption is suspected, validate the table metadata and consider a snapshot re-publish"],"exampleFix":"// before\n<dependency><groupId>org.apache.iceberg</groupId><artifactId>iceberg-core</artifactId><version>1.7.0</version></dependency> // newer enum than Beam handles\n// after\n<dependency><groupId>org.apache.iceberg</groupId><artifactId>iceberg-core</artifactId><version>1.4.3</version></dependency> <!-- Beam-compatible -->","handlingStrategy":"try-catch","validationCode":"// preflight on a driver: ensure every status maps to a known enum constant\nfor (ManifestEntry<?> e : entries) {\n  checkState(isKnownStatus(e.status()), \"unknown entry status: \" + e.status());\n}","typeGuard":null,"tryCatchPattern":"try {\n  createTasks(...);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().startsWith(\"Unexpected entry status:\")) {\n    LOG.error(\"Unknown manifest entry status {} — check Beam/Iceberg version match\", e.getMessage());\n    throw e;\n  }\n}","preventionTips":["Keep Beam's iceberg module and iceberg-core versions aligned","Validate table metadata integrity after suspicious failures","Test pipelines against Iceberg upgrades before rollout"],"tags":["iceberg","enum","version-conflict"],"backgroundTag":"invalid-enum-value","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"}