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)