{"record":{"id":"c35185dead6fcfd0","repo":"apache/iceberg","slug":"unsupported-status-c35185","errorCode":null,"errorMessage":"Unsupported status: ","messagePattern":"Unsupported status: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java","lineNumber":156,"sourceCode":"      GetSplitResult getResult = assigner.getNext(hostname);\n      if (getResult.status() == GetSplitResult.Status.AVAILABLE) {\n        LOG.info(\"Assign split to subtask {}: {}\", awaitingSubtask, getResult.split());\n        enumeratorContext.assignSplit(getResult.split(), awaitingSubtask);\n        awaitingReader.remove();\n      } else if (getResult.status() == GetSplitResult.Status.CONSTRAINED) {\n        getAvailableFutureIfNeeded();\n        break;\n      } else if (getResult.status() == GetSplitResult.Status.UNAVAILABLE) {\n        if (shouldWaitForMoreSplits()) {\n          getAvailableFutureIfNeeded();\n          break;\n        } else {\n          LOG.info(\"No more splits available for subtask {}\", awaitingSubtask);\n          enumeratorContext.signalNoMoreSplits(awaitingSubtask);\n          awaitingReader.remove();\n        }\n      } else {\n        throw new IllegalArgumentException(\"Unsupported status: \" + getResult.status());\n      }\n    }\n  }\n\n  /** return true if enumerator should wait for splits like in the continuous enumerator case */\n  protected abstract boolean shouldWaitForMoreSplits();\n\n  private synchronized void getAvailableFutureIfNeeded() {\n    if (availableFuture.get() != null) {\n      return;\n    }\n\n    CompletableFuture<Void> future =\n        assigner\n            .isAvailable()\n            .thenAccept(\n                ignore ->\n                    // Must run assignSplits in coordinator thread","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java#L138-L174","documentation":"During assignSplits, AbstractIcebergEnumerator checks the SplitAssigner's tryAssignSplits result status. Only AVAILABLE (splits assigned) and ALREADY_COMPLETED are expected; any other SplitAssignmentStatus reaches the else branch and throws IllegalArgumentException('Unsupported status: ' + status). Called from handleSourceEvent, addSplitsBack, and the future callback — this indicates the assigner returned a status the enumerator doesn't understand.","triggerScenarios":"A custom SplitAssigner implementation returns a SplitAssignmentStatus value outside {AVAILABLE, ALREADY_COMPLETED}, or an incompatibility between a custom assigner and the enumerator's expected protocol.","commonSituations":"Custom assigner plugins written against a different Iceberg version; local code changes adding new enum constants to SplitAssignmentStatus without updating the enumerator; jar version mismatches.","solutions":["Use the stock SimpleSplitAssigner (or Iceberg's assigned assigner) instead of a custom SplitAssigner.","If a custom assigner is required, return only AVAILABLE or ALREADY_COMPLETED from tryAssignSplits.","Rebuild with a single, consistent Iceberg version so assigner and enumerator share the same enum.","Log the full status value from the message and compare against your assigner's return paths."],"exampleFix":"// before\nreturn new AssignerResult(SplitAssignmentStatus.IN_PROGRESS, assignments); // unsupported\n// after\nreturn new AssignerResult(SplitAssignmentStatus.AVAILABLE, assignments);","handlingStrategy":"validation","validationCode":"SplitAssignmentStatus status = result.status();\nPreconditions.checkArgument(status == SplitAssignmentStatus.AVAILABLE || status == SplitAssignmentStatus.ALREADY_COMPLETED, \"Unsupported status: \" + status);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the built-in SimpleSplitAssigner unless you have a strong reason not to.","Keep custom assigners returning only AVAILABLE or ALREADY_COMPLETED.","Build against one Iceberg version so enum definitions match."],"tags":["flink","source-enumerator","enum","assigner"],"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"}