Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2723#discussion_r85770344
  
    --- Diff: 
flink-scala/src/main/scala/org/apache/flink/api/scala/typeutils/OptionSerializer.scala
 ---
    @@ -65,7 +65,7 @@ class OptionSerializer[A](val elemSerializer: 
TypeSerializer[A])
         case Some(a) =>
           target.writeBoolean(true)
           elemSerializer.serialize(a, target)
    -    case None =>
    +    case _ =>
    --- End diff --
    
    This would represent `null` the same way as `None`. However, `null` is not 
the same as `None` so this is incorrect. 
    
    `writeBoolean` serializes a whole byte: `0` for `false` and `1` for `true`. 
    We should change `writeBoolean` to `writeByte` and keep the current mapping 
and add `2` for `null`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to