[ 
https://issues.apache.org/jira/browse/FLINK-16916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aljoscha Krettek closed FLINK-16916.
------------------------------------
    Fix Version/s:     (was: 1.10.2)
                   1.10.1
       Resolution: Fixed

master: d6d7158d0a205e7d4524ae39c5cd7512d7c0ab38
release-1.10: 5c89c61c051c2f5728d8a5bfb7d833158f9eabb7
release-1.9: 6c4112ee955171331f464ffd8c13324adc83f06e
release-1.8: 8e97e1137fc85db2dbef6d50b687332f0c013ce5

> 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
>              Labels: pull-request-available
>             Fix For: 1.8.4, 1.9.3, 1.10.1, 1.11.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to