{"record":{"id":"1c36a4c5ca7d9ff2","repo":"apache/beam","slug":"unsupported-cell-value-type-s","errorCode":null,"errorMessage":"Unsupported cell value type '%s'.","messagePattern":"Unsupported cell value type '(.+?)'\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/CellValueParser.java","lineNumber":72,"sourceCode":"        checkArgument(valueSize == 8, message(\"Int64\", 8));\n        return Longs.fromByteArray(cellValue.toByteArray());\n      case FLOAT:\n        checkArgument(valueSize == 4, message(\"Float\", 4));\n        return Float.intBitsToFloat(Ints.fromByteArray(cellValue.toByteArray()));\n      case DOUBLE:\n        checkArgument(valueSize == 8, message(\"Double\", 8));\n        return Double.longBitsToDouble(Longs.fromByteArray(cellValue.toByteArray()));\n      case DATETIME:\n        return DateTime.parse(cellValue.toStringUtf8());\n      case STRING:\n        return cellValue.toStringUtf8();\n      case BYTES:\n        return cellValue.toByteArray();\n      case LOGICAL_TYPE:\n        String identifier = checkArgumentNotNull(type.getLogicalType()).getIdentifier();\n        throw new IllegalStateException(\"Unsupported logical type: \" + identifier);\n      default:\n        throw new IllegalArgumentException(\n            String.format(\"Unsupported cell value type '%s'.\", type.getTypeName()));\n    }\n  }\n\n  ByteString valueToByteString(Object value, Schema.FieldType type) {\n    switch (type.getTypeName()) {\n      case BOOLEAN:\n        return byteString(((Boolean) value) ? new byte[] {1} : new byte[] {0});\n      case FLOAT:\n        return byteString(Ints.toByteArray(Float.floatToIntBits((Float) value)));\n      case DOUBLE:\n        return byteString(Longs.toByteArray(Double.doubleToLongBits((Double) value)));\n      case BYTE:\n        return byteString(new byte[] {(Byte) value});\n      case INT16:\n        return byteString(Shorts.toByteArray((Short) value));\n      case INT32:\n        return byteString(Ints.toByteArray((Integer) value));","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/CellValueParser.java#L54-L90","documentation":"CellValueParser.getCellValue throws IllegalArgumentException with \"Unsupported cell value type '%s'.\" when the field's TypeName falls into the default branch of its switch — i.e. the declared Schema.FieldType is not one of the primitive types the parser knows how to decode from a Bigtable ByteString cell.","triggerScenarios":"Calling getCellValue (directly or via BigtableIO schema mapping) with a FieldType whose TypeName is not STRING/BYTES/INT/FLOAT/DOUBLE/BOOLEAN/DECIMAL/etc. handled by the switch, e.g. an ARRAY, MAP, ITERABLE, or ROW type for a single cell value.","commonSituations":"Mapping a Bigtable cell to a collection or nested-row schema field; autogenerated schemas where a field was declared as repeated; version upgrades that introduced new TypeNames not yet handled by this parser.","solutions":["Declare the cell field as BYTES or STRING and do the conversion/collection assembly in your own DoFn.","Check the FieldType you configured matches a supported primitive type for cell values.","Flatten arrays/maps into separate cells or use a custom parse function instead of schema-based mapping."],"exampleFix":"// before\nSchema.FieldType type = Schema.FieldType.iterable(Schema.FieldType.INT64);\n// after\nSchema.FieldType type = Schema.FieldType.BYTES; // decode Iterable<Integer> yourself from the bytes","handlingStrategy":"validation","validationCode":"java.util.Set<Schema.TypeName> supported = java.util.Set.of(\n  Schema.TypeName.STRING, Schema.TypeName.BYTES, Schema.TypeName.INT64,\n  Schema.TypeName.DOUBLE, Schema.TypeName.BOOLEAN);\nfor (Schema.Field f : schema.getFields()) {\n  if (!supported.contains(f.getType().getTypeName())) {\n    throw new IllegalArgumentException(\"Cell field \" + f.getName() + \" type \"\n      + f.getType().getTypeName() + \" not supported for Bigtable cell parsing.\");\n  }\n}","typeGuard":"static boolean isScalarFieldType(Schema.FieldType t) {\n  return !java.util.EnumSet.of(Schema.TypeName.ARRAY, Schema.TypeName.ITERABLE,\n    Schema.TypeName.MAP, Schema.TypeName.ROW).contains(t.getTypeName());\n}","tryCatchPattern":null,"preventionTips":["Map each Bigtable cell to a scalar schema field only.","Decode collections/nested structures from BYTES in your own code.","Pin and review the Beam version — new TypeNames may not yet be handled."],"tags":["bigtable","schema","unsupported-type","java"],"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"}