Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.8.3, 1.9.2, 1.10.0
Description
When debugging the problem reported by FLINK-16724, Found that the logic of NullableSerializer#copy is wrong. currently, the logic is such as below:
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); } }
we forgot to skip paddings.length bytes when if the padding's length is not 0.
We can correct the logic such as below
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); } }
Attachments
Issue Links
- links to