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

ASF GitHub Bot commented on FLINK-7627:
---------------------------------------

Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/4674
  
    Thanks for the info @hequn8128! As I said before, I don't mind making 
`SingleElementIterable` `Serializable`. However, we have to ensure that the 
property also holds. `element: T` is not necessarily serializable so the 
serialization might fail. We can not easily declare `T` as `Serializable` 
because that would mean to change the interface of the `AggregateFunction` and 
enforce serializabiliy on the accumulators.
    
    I see two options:
    - declare the `element` field as `transient` and ensure that the 
`SingleElementIterable` is only used in a context where it is OK to lose 
`element` during serialization.
    - override the default de/serialization methods and serialize `element` 
using a `TypeSerializer`.
    
    What do you think?
    
    Best, Fabian


> SingleElementIterable should implement with Serializable 
> ---------------------------------------------------------
>
>                 Key: FLINK-7627
>                 URL: https://issues.apache.org/jira/browse/FLINK-7627
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Hequn Cheng
>            Assignee: Hequn Cheng
>
> {{SingleElementIterable}} is used to merge accumulators and it should be 
> serializable considering that it will be serialized when doing checkpoint.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to