azagrebin commented on a change in pull request #6707: [FLINK-10157] [State TTL] Allow `null` user values in map state with TTL URL: https://github.com/apache/flink/pull/6707#discussion_r219146864
########## File path: flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/NullableSerializer.java ########## @@ -116,7 +139,7 @@ public T copy(T from, T reuse) { @Override public int getLength() { int len = originalSerializer.getLength(); - return len < 0 ? len : len + 1; + return len == 0 ? 1 : -1; Review comment: The serializer does not have fixed length in common case now (1 or 1 + original length). It is fixed to 1 only of original length is zero. Let's add an option to pad the null value and preserve the fixed length if original serializer has the fixed length. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services