lamber-ken commented on issue #8583: [FLINK-11820][serialization] SimpleStringSchema handle message record which value is null URL: https://github.com/apache/flink/pull/8583#issuecomment-500730854 > @lamber-ken > > The contract of `deserialize()` says: > > ``` > * > * @return The deserialized message as an object (null if the message cannot be deserialized). > */ > ``` > > That is, returning `null` from the deserialization schema denotes an erroneous condition. Null records in Kafka can have valid semantics. However, if we apply your patch, null records will be discarded by the Kafka connector (i.e., they won't be consumed by downstream operators). Let me know if you see a solution to this problem. hi, @GJL , I can't fully understand your comment. from my side, as a message queue like kafka, consumers and producers are decoupled. Consumers don't known whether producers put a valid data or not, may producers put a `null` into message queue, so flink kafka consumer need to consider this scene. The flink job will go into an infinite circle because of the NPE, so this pr just aims to fix the NPE. This pr don't care about whether null needs to be sent to downstream operators. If downstream operators needs to consumer null valuses, may need to modify `AbstractFetcher#emitRecord`.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
