[ https://issues.apache.org/jira/browse/FLINK-16916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aljoscha Krettek reassigned FLINK-16916: ---------------------------------------- Assignee: Congxian Qiu(klion26) > The logic of NullableSerializer#copy is wrong > --------------------------------------------- > > Key: FLINK-16916 > URL: https://issues.apache.org/jira/browse/FLINK-16916 > Project: Flink > Issue Type: Bug > Components: API / Type Serialization System > Affects Versions: 1.8.3, 1.9.2, 1.10.0 > Reporter: Congxian Qiu(klion26) > Assignee: Congxian Qiu(klion26) > Priority: Blocker > Fix For: 1.8.4, 1.9.3, 1.11.0, 1.10.2 > > > When debugging the problem reported by FLINK-16724, Found that the logic of > {{NullableSerializer#copy}} is wrong. currently, the logic is such as below: > {code:java} > public void copy(DataInputView source, DataOutputView target) throws > IOException { > boolean isNull = source.readBoolean(); > target.writeBoolean(isNull); > if (isNull) { > target.write(padding); > } > else { > originalSerializer.copy(source, target); > } > } > {code} > we forgot to skip {{paddings.length}} bytes when if the {{padding}}'s length > is not 0. > We can correct the logic such as below > {code:java} > public void copy(DataInputView source, DataOutputView target) throws > IOException { > boolean isNull = deserializeNull(source); // this will skip the padding > values. > target.writeBoolean(isNull); > if (isNull) { > target.write(padding); > } > else { > originalSerializer.copy(source, target); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)