Abacn opened a new issue, #23374: URL: https://github.com/apache/beam/issues/23374
### What would you like to happen? It was mentioned in #7865 that a CoderLogicalType could enable any existing Coder to be used as a Schema field. In particular, the micros_millis and decimal logical types are made to be compatible with existing datetime and decimal java fieldtype, and they do not fit in the beam portable logical type representations. Currently they are treated as special cases with a representation that is not quite true: https://github.com/apache/beam/blob/3a4d57eb8976c5f503b32d478a80b1800490f66f/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaTranslation.java#L201 For example, here DATETIME has a representation of FieldType.INT64, but FieldType.INT64 is decoded with VarIntCoder, different from the actually used BigEndianLongCoder. here DECIMAL has a representation of FieldType.BYTES, but the actually used BigDecimalCoder encoded a VarInt and a Bytes. Introducing CoderLogicalType and specify the coder to the logical type's payload could clarify this issue. ### Issue Priority Priority: 2 ### Issue Component Component: cross-language -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
