{"record":{"id":"33475746452d3b6b","repo":"apache/iceberg","slug":"unknown-starting-strategy-334757","errorCode":null,"errorMessage":"Unknown starting strategy: ","messagePattern":"Unknown starting strategy: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/ContinuousSplitPlannerImpl.java","lineNumber":244,"sourceCode":"      case INCREMENTAL_FROM_LATEST_SNAPSHOT_EXCLUSIVE:\n        return Optional.ofNullable(table.currentSnapshot());\n      case INCREMENTAL_FROM_EARLIEST_SNAPSHOT:\n        return Optional.ofNullable(SnapshotUtil.oldestAncestor(table));\n      case INCREMENTAL_FROM_SNAPSHOT_ID:\n        Snapshot matchedSnapshotById = table.snapshot(scanContext.startSnapshotId());\n        Preconditions.checkArgument(\n            matchedSnapshotById != null,\n            \"Start snapshot id not found in history: \" + scanContext.startSnapshotId());\n        return Optional.of(matchedSnapshotById);\n      case INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP:\n        Snapshot matchedSnapshotByTimestamp =\n            SnapshotUtil.oldestAncestorAfter(table, scanContext.startSnapshotTimestamp());\n        Preconditions.checkArgument(\n            matchedSnapshotByTimestamp != null,\n            \"Cannot find a snapshot after: \" + scanContext.startSnapshotTimestamp());\n        return Optional.of(matchedSnapshotByTimestamp);\n      default:\n        throw new IllegalArgumentException(\n            \"Unknown starting strategy: \" + scanContext.streamingStartingStrategy());\n    }\n  }\n}\n","sourceCodeStart":226,"sourceCodeEnd":249,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/ContinuousSplitPlannerImpl.java#L226-L249","documentation":"ContinuousSplitPlannerImpl.startSnapshot resolves the first snapshot for a streaming scan based on scanContext.streamingStartingStrategy(). The switch covers NONE/TABLE_SCAN_THEN_INCREMENTS, INCREMENTS_FROM_SNAPSHOT_ID, and INCREMENTS_FROM_SNAPSHOT_TIMESTAMP; an unrepresented strategy value falls into default and throws IllegalArgumentException('Unknown starting strategy: ...'). This means the StreamingStartingStrategy enum value is not recognized by this planner.","triggerScenarios":"Setting a StreamingStartingStrategy value unknown to this build — e.g., a strategy added in a newer Iceberg version used with an older planner, a null/corrupted strategy deserialized from ScanContext, or custom enum extension.","commonSituations":"Version skew between job jar and saved checkpoint/config carrying the strategy; hand-built ScanContext passing an exotic strategy; typos when constructing strategy programmatically.","solutions":["Use only documented strategies: TABLE_SCAN_THEN_INCREMENTS, INCREMENTS_FROM_SNAPSHOT_ID, or INCREMENTS_FROM_SNAPSHOT_TIMESTAMP.","Align all nodes/jars to one Iceberg version so the configured strategy exists in this build.","If loading strategy from config/checkpoint, validate it parses to a known enum constant before building ScanContext.","Print the offending value from the message and map it to the closest supported strategy for your use case."],"exampleFix":"// before\ncontext.startingStrategy(UNKNOWN_NEW_STRATEGY);\n// after\ncontext.startingStrategy(StreamingStartingStrategy.TABLE_SCAN_THEN_INCREMENTS);","handlingStrategy":"validation","validationCode":"StreamingStartingStrategy s = scanContext.streamingStartingStrategy();\nSet<StreamingStartingStrategy> supported = Set.of(TABLE_SCAN_THEN_INCREMENTS, INCREMENTS_FROM_SNAPSHOT_ID, INCREMENTS_FROM_SNAPSHOT_TIMESTAMP);\nPreconditions.checkArgument(supported.contains(s), \"Unsupported starting strategy: \" + s);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use documented StreamingStartingStrategy constants.","Validate strategy values when deserializing from config or checkpoints.","Keep job jar and stored state on compatible Iceberg versions."],"tags":["flink","streaming","enum","starting-strategy"],"backgroundTag":"invalid-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}