[ 
https://issues.apache.org/jira/browse/FLINK-24895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444312#comment-17444312
 ] 

Timo Walther commented on FLINK-24895:
--------------------------------------

Thanks, we will find someone who can fix this.

> SqlTimestampSerializer#deserialize forgets to fully read from source when the 
> record is null.
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLINK-24895
>                 URL: https://issues.apache.org/jira/browse/FLINK-24895
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Type Serialization System
>            Reporter: bx123
>            Priority: Minor
>
> As we support null Timestamp in this Serializer. In the 2 deserialize() 
> methods, when we read the first long and get Long.MIN_VALUE, we directly 
> return null and forget to read the next int which responds to nanos.
> If there is really a null Timestamp that has been serialized before, we may 
> get wrong value when we deserialize the Object after this timestamp. So 
> before return null,  source.skipBytesToRead(4) is needed to make the source 
> in the right position.
> By the way, I find the copy(source, target) is implemented by deserialize the 
> intermediate value, while its more efficient to just copy 12 bytes from 
> source to target like target.write(source, 12).
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to