You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
// Special-case for DATETIME and DECIMAL which are logical types in portable representation,
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
The text was updated successfully, but these errors were encountered:
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:
beam/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaTranslation.java
Line 201 in 3a4d57e
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
The text was updated successfully, but these errors were encountered: