[jira] [Created] (FLINK-20459) Handle null message correctly in JSON RowData deserializer

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20459) Handle null message correctly in JSON RowData deserializer

Shang Yuanchun (Jira)
Qingsheng Ren created FLINK-20459:
-------------------------------------

             Summary: Handle null message correctly in JSON RowData deserializer
                 Key: FLINK-20459
                 URL: https://issues.apache.org/jira/browse/FLINK-20459
             Project: Flink
          Issue Type: Bug
          Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile)
            Reporter: Qingsheng Ren


Currently if the input message of the `deserialize()` method is null and the deserializer is not ignoring parse errors, `new String(message)` in the exception part will lead to an NPE.

 

A possible solution is returning null directly if the input message is null, but I'm not sure if this is a correct behavior since a null message can be treated as a "corrupted" message which cannot be deserialized as JSON and should lead to an exception. 



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