You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/06 10:08:55 UTC

[GitHub] [flink] pnowojski commented on pull request #20158: [FLINK-28357][datastream] Disallow null elements in StreamNode#typeSerializersIn

pnowojski commented on PR #20158:
URL: https://github.com/apache/flink/pull/20158#issuecomment-1176038063

   This code kind of always assumed serializers can be null. Both input and output. Originally, before we introduced multiple input operators, it kind of held together, as the `StreamNode` had three fields: `typeSerializerIn1`, `typeSerializerIn2` and `typeSerializerOut`. Either of those could be null. When introducing multiple inputs, I squashed the `typeSerializerInX` fields into an array, unfortunately also preserving nulls. 
   
   I've looked into disallowing nulls into those setters, but that made the caller code quite ugly, with lots of ifs. And those nulls are used in a quite a lot of places (check `StreamGraph#setSerializers(...)` calls)


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org