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

Xue Wang commented on FLINK-20321:
----------------------------------

Thank you, [~sampadsaha5]. I've worked with Avro Serdes and Confluent Schema 
Registry during several projects. I'll definitely take this opportunity to 
learn more about Flink and contribute to the community. Feel free to get back 
when you have time, contributions are always welcome. Cheers!

> Get NPE when using AvroDeserializationSchema to deserialize null input
> ----------------------------------------------------------------------
>
>                 Key: FLINK-20321
>                 URL: https://issues.apache.org/jira/browse/FLINK-20321
>             Project: Flink
>          Issue Type: Bug
>          Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile), Table 
> SQL / Ecosystem
>    Affects Versions: 1.12.0
>            Reporter: Shengkai Fang
>            Assignee: Sampad Kumar Saha
>            Priority: Major
>              Labels: sprint, starter
>             Fix For: 1.13.0
>
>
> You can reproduce the bug by adding the code into the 
> {{AvroDeserializationSchemaTest}}.
> The code follows
> {code:java}
> @Test
>       public void testSpecificRecord2() throws Exception {
>               DeserializationSchema<Address> deserializer = 
> AvroDeserializationSchema.forSpecific(Address.class);
>               Address deserializedAddress = deserializer.deserialize(null);
>               assertEquals(null, deserializedAddress);
>       }
> {code}
> Exception stack:
> {code:java}
> java.lang.NullPointerException
>       at 
> org.apache.flink.formats.avro.utils.MutableByteArrayInputStream.setBuffer(MutableByteArrayInputStream.java:43)
>       at 
> org.apache.flink.formats.avro.AvroDeserializationSchema.deserialize(AvroDeserializationSchema.java:131)
>       at 
> org.apache.flink.formats.avro.AvroDeserializationSchemaTest.testSpecificRecord2(AvroDeserializationSchemaTest.java:69)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to