You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Weijie Guo (Jira)" <ji...@apache.org> on 2022/06/23 06:14:00 UTC

[jira] [Comment Edited] (FLINK-28214) ArrayDataSerializer can not be reused to copy customized type of array data

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

Weijie Guo edited comment on FLINK-28214 at 6/23/22 6:13 AM:
-------------------------------------------------------------

Hi [~yittg], I'm not particularly sure why the extra copy is needed here. IMHO, BinaryMapData needs a continuous memory space to store key and value, but reuseKeyWriter and reuseValueWriter have two independent memory spaces, so copying needs to occur.For BinaryArrayData, no special handling should be required.Let me know if I missed something.


was (Author: weijie guo):
Hi [~yittg], I'm not particularly sure why the extra copy is needed here. IMIO, BinaryMapData needs a continuous memory space to store key and value, but reuseKeyWriter and reuseValueWriter have two independent memory spaces, so copying needs to occur.For BinaryArrayData, no special handling should be required.Let me know if I missed something.

> ArrayDataSerializer can not be reused to copy customized type of array data 
> ----------------------------------------------------------------------------
>
>                 Key: FLINK-28214
>                 URL: https://issues.apache.org/jira/browse/FLINK-28214
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Yi Tang
>            Priority: Minor
>
> In FLINK-25238, we fix the ArrayDataSerializer to support copying customized type of array data with similar way in MapDataSerializer.
> The MapDataSerializer#toBinaryMap always contains copy semantics implicitly
> but ArrayDataSerializer#toBinaryArray not.
> So the returned value of ArrayDataSerializer#toBinaryArray will be covered by new copied data.
> We should always copy from the returned value of ArrayDataSerializer#toBinaryArray in ArrayDataSerializer#copy explicitly.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)