{"record":{"id":"c97706ba617f0dde","repo":"apache/beam","slug":"unsupported-task-type","errorCode":null,"errorMessage":"Unsupported task type: {}","messagePattern":"Unsupported task type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/cdc/ChangelogScanner.java","lineNumber":783,"sourceCode":"                    \"Upper and/or lower bounds are missing for %s with \"\n                        + \"DataFile '%s' and DeleteFile '%s'\",\n                    task.getClass().getSimpleName(),\n                    getDataFile(task).location(),\n                    deleteFile.location()));\n          }\n\n          GenericRecord delFileLower = createRecId(recIdSchema, lowerDelBounds);\n          GenericRecord delFileUpper = createRecId(recIdSchema, upperDelBounds);\n\n          if (lowerId == null || idComp.compare(delFileLower, lowerId) < 0) {\n            lowerId = delFileLower;\n          }\n          if (upperId == null || idComp.compare(delFileUpper, upperId) > 0) {\n            upperId = delFileUpper;\n          }\n        }\n      } else {\n        throw new UnsupportedOperationException(\n            \"Unsupported task type: \" + task.getClass().getSimpleName());\n      }\n\n      if (lowerId == null || upperId == null) {\n        throw new NoBoundMetricsException(\n            format(\n                \"Could not compute min and/or max bounds for %s with DataFile: %s\",\n                task.getClass().getSimpleName(), getDataFile(task).location()));\n      }\n      return new TaskAndBounds(task, lowerId, upperId);\n    }\n\n    /**\n     * Compares itself with another task. If the bounds overlap, sets {@link #overlaps} to true for\n     * both tasks.\n     */\n    private void checkOverlapWith(TaskAndBounds other, Comparator<StructLike> idComp) {\n      if (overlaps && other.overlaps) {","sourceCodeStart":765,"sourceCodeEnd":801,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/cdc/ChangelogScanner.java#L765-L801","documentation":"ChangelogScanner's bound computation derives lower/upper record-identifier bounds per task and switches on the task's concrete class; a class outside the supported set has no bound extraction, so the constructor path throws UnsupportedOperationException naming the simple class name.","triggerScenarios":"TaskAndBounds computation (invoked from ChangelogScanner construction) encounters a task whose class is neither AddedRowsScanTask nor the handled delete task types — e.g. an unrecognized ChangelogScanTask subtype from a newer Iceberg runtime.","commonSituations":"Iceberg library version skew introducing new scan task types; classpath mixing multiple iceberg versions; tables using newly introduced changelog features read by an older connector.","solutions":["Align the Iceberg runtime version with the Beam CDC connector's expected version.","Patch ChangelogScanner's bound-extraction switch to support the new task type and rebuild.","Avoid enabling new Iceberg features on scanned tables, or fall back to a non-CDC incremental read.","Run mvn dependency:tree to ensure only one consistent org.apache.iceberg version is present."],"exampleFix":"// before\n<dependency>iceberg-core:1.8.0</dependency> // new ChangelogScanTask subtype\n// after\n<dependency>iceberg-core:1.5.2</dependency> // supported by ChangelogScanner","handlingStrategy":"try-catch","validationCode":"boolean known = task instanceof AddedRowsScanTask || task instanceof DeletedDataFileScanTask || task instanceof DeletedRowsScanTask;\nif (!known) throw new UnsupportedOperationException(\"Unsupported task type for bound extraction\");","typeGuard":"boolean supportsBounds(ChangelogScanTask t) {\n  return t instanceof AddedRowsScanTask || t instanceof DeletedDataFileScanTask || t instanceof DeletedRowsScanTask;\n}","tryCatchPattern":"try {\n  TaskAndBounds bounds = TaskAndBounds.of(task, recIdSchema, idComp);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().startsWith(\"Unsupported task type\")) {\n    throw new IllegalStateException(\"Use a connector version matching your Iceberg runtime: \" + e.getMessage(), e);\n  }\n  throw e;\n}","preventionTips":["Pin a single consistent org.apache.iceberg version.","Upgrade the Beam CDC connector when upgrading Iceberg.","Avoid table features that introduce new scan task types until the connector supports them."],"tags":["java","iceberg","cdc","version-mismatch","unsupported-task"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}