You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Tzu-Li (Gordon) Tai (JIRA)" <ji...@apache.org> on 2018/06/12 08:43:00 UTC
[jira] [Created] (FLINK-9569) Confusing construction of
AvroSerializers for generic records
Tzu-Li (Gordon) Tai created FLINK-9569:
------------------------------------------
Summary: Confusing construction of AvroSerializers for generic records
Key: FLINK-9569
URL: https://issues.apache.org/jira/browse/FLINK-9569
Project: Flink
Issue Type: Improvement
Components: Type Serialization System
Reporter: Tzu-Li (Gordon) Tai
Assignee: Tzu-Li (Gordon) Tai
The {{AvroSerializer}} currently has a {{AvroSerializer(Class<T> type, Schema schema)}} public constructor when used for generic records.
This is a bit confusing, because when using the \{{AvroSerializer}}, the type to be serialized should always be a {{GenericData.Record}} type.
We should either:
- have a separate subclass of {{AvroSerializer}}, say {{GenericRecordAvroSerializer}} that is a {{AvroSerializer<GenericRecord>}}, or
- follow a similar approach to the instantiation methods in the {{AvroDeserialiationSchema}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)