[
https://issues.apache.org/jira/browse/FLINK-23727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17400787#comment-17400787
]
Paul Lin edited comment on FLINK-23727 at 8/18/21, 5:13 AM:
------------------------------------------------------------
[~paul8263] WRT solutions, I've considered adding a flag as you suggested, but
I doubt in what cases users would need NPE? That's obviously not a best
practice. Moreover, Flink deserializer interface states that implementations
should return null instead of throwing exceptions if the record can not be
deserialized. So I think we could just fix the NPE, no need for an extra
parameter.
was (Author: paul lin):
[~paul8263] WRT solutions, I've considered adding a flag as you suggested, but
I doubt in what cases users would need NPE? That's obviously not a best
practice. Moreover, Flink deserializer interface states that implementations
should return null if the record can not be deserialized instead of throwing
exceptions. So I think we could just fix the NPE, no need for an extra
parameter.
> Skip null values in SimpleStringSchema#deserialize
> --------------------------------------------------
>
> Key: FLINK-23727
> URL: https://issues.apache.org/jira/browse/FLINK-23727
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Common
> Affects Versions: 1.13.2
> Reporter: Paul Lin
> Priority: Major
>
> In Kafka use cases, it's valid to send a message with a key and a null
> payload as a tombstone. But SimpleStringSchema, which is frequently used as a
> message value deserializer, throws NPE when the input value is null. We
> should tolerate null values in SimpleStringSchema (simply return null to skip
> the records), otherwise users need to implement a custom one.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)