[ 
https://issues.apache.org/jira/browse/FLINK-9337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16476299#comment-16476299
 ] 

ASF GitHub Bot commented on FLINK-9337:
---------------------------------------

Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5995#discussion_r188386920
  
    --- Diff: 
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java
 ---
    @@ -275,9 +304,19 @@ else if (configSnapshot instanceof 
AvroSerializerConfigSnapshot) {
        //  Utilities
        // 
------------------------------------------------------------------------
     
    +   private static boolean isGenericRecord(Class<?> type) {
    +           return !SpecificRecord.class.isAssignableFrom(type) &&
    +                   GenericRecord.class.isAssignableFrom(type);
    +   }
    +
        @Override
        public TypeSerializer<T> duplicate() {
    -           return new AvroSerializer<>(type);
    +           if (schemaString != null) {
    +                   return new AvroSerializer<>(type, new 
Schema.Parser().parse(schemaString));
    --- End diff --
    
    Didn't think it through well. Thought we need to create a deep copy of the 
schema, but as it is stateless I think we can just pass the schema. My mistake. 
Correct me if I am wrong. 


> Implement AvroDeserializationSchema
> -----------------------------------
>
>                 Key: FLINK-9337
>                 URL: https://issues.apache.org/jira/browse/FLINK-9337
>             Project: Flink
>          Issue Type: New Feature
>            Reporter: Dawid Wysakowicz
>            Assignee: Dawid Wysakowicz
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to