{"record":{"id":"ce75eae99ac02992","repo":"apache/beam","slug":"encountered-a-type-that-is-not-currently-supported-by-ce75ea","errorCode":null,"errorMessage":"Encountered a type that is not currently supported by RowCoder: %s","messagePattern":"Encountered a type that is not currently supported by RowCoder: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/coders/row_coder.py","lineNumber":195,"sourceCode":"      # unknown Python object.\n      return typecoders.registry.get_coder(object)\n    elif field_type.logical_type.urn == common_urns.millis_instant.urn:\n      # Special case for millis instant logical type used to handle Java sdk's\n      # millis Instant. It explicitly uses TimestampCoder which deals with fix\n      # length 8-bytes big-endian-long instead of VarInt coder.\n      return TimestampCoder()\n    elif field_type.logical_type.urn == 'beam:logical_type:decimal:v1':\n      return DecimalCoder()\n\n    logical_type = LogicalType.from_runner_api(field_type.logical_type)\n    return LogicalTypeCoder(\n        logical_type, _coder_from_type(field_type.logical_type.representation))\n  elif type_info == \"row_type\":\n    return RowCoder(field_type.row_type.schema)\n\n  # The Java SDK supports several more types, but the coders are not yet\n  # standard, and are not implemented in Python.\n  raise ValueError(\n      \"Encountered a type that is not currently supported by RowCoder: %s\" %\n      field_type)\n\n\nclass LogicalTypeCoder(FastCoder):\n  def __init__(self, logical_type, representation_coder):\n    self.logical_type = logical_type\n    self.representation_coder = representation_coder\n\n  def _create_impl(self):\n    return LogicalTypeCoderImpl(self.logical_type, self.representation_coder)\n\n  def is_deterministic(self):\n    return self.representation_coder.is_deterministic()\n\n  def to_type_hint(self):\n    return self.logical_type.language_type()\n","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/coders/row_coder.py#L177-L213","documentation":"RowCoder encodes Beam schema rows and _nonnull_coder_from_type maps each schema field's Beam FieldType to a standard coder. Some field types supported by the Java SDK (and some exotic/logical types) have no standard Python coder implementation yet, so an unsupported field type raises ValueError.","triggerScenarios":"Creating a RowCoder for a schema containing a field whose FieldType (atomic, array, map, iterable, logical, row aside) has no implemented mapping in _coder_from_type/_nonnull_coder_from_type.","commonSituations":"Cross-language pipelines where a Java-defined schema includes types not yet standard in the Python SDK; schemas inferred from dataclasses/typed rows containing unsupported logical types; SDK version skew between writer and reader.","solutions":["Upgrade apache-beam to a version whose RowCoder supports the offending field type","Change the schema field to a supported type (e.g. use bytes/string representation for the unsupported logical type)","Set a custom representation for the LogicalType so its representation maps to a supported coder","If the schema comes from a Java/other-SDK pipeline, adjust the cross-language stage or code the field as bytes"],"exampleFix":"// before\n# schema field of unsupported logical type\n@dataclass\nclass Row:\n  fancy: MyUnsupportedLogicalType\n// after\n@dataclass\nclass Row:\n  fancy: str  # logical type represented as its string representation","handlingStrategy":"validation","validationCode":"from apache_beam.typehints import schema\nfor name, ftype in schema_schema_fields:\n    if str(ftype.type_info) not in {'atomic_type','array_type','iterable_type','map_type','logical_type','row_type'}:\n        raise ValueError(f'field {name}: unsupported RowCoder type {ftype}')","typeGuard":null,"tryCatchPattern":"try:\n    coder = RowCoder(schema)\nexcept ValueError as e:\n    log.error('RowCoder cannot encode schema: %s', e)\n    raise","preventionTips":["Keep row schemas limited to types standard across SDKs","Upgrade apache-beam before consuming schemas from newer Java pipelines","Give logical types a simple supported representation (str/bytes)"],"tags":["python","schema","coders","apache-beam","unsupported-type"],"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"}