[
https://issues.apache.org/jira/browse/FLINK-12822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16862837#comment-16862837
]
Till Rohrmann commented on FLINK-12822:
---------------------------------------
Makes sense to me. Can you create a PR out of the patch [~Tison] and cc me?
> Add explicit transformer from SerializableOptional to Optional
> --------------------------------------------------------------
>
> Key: FLINK-12822
> URL: https://issues.apache.org/jira/browse/FLINK-12822
> Project: Flink
> Issue Type: Improvement
> Components: API / Type Serialization System
> Affects Versions: 1.9.0
> Reporter: TisonKun
> Assignee: TisonKun
> Priority: Major
> Fix For: 1.9.0
>
> Attachments: FLINK-12822.patch
>
>
> We introduce {{SerializableOptional}} to represent return value that of
> {{Optional}} and transported cross network.
> The purpose is reasonable. However, a wart is inside
> {{SerializableOptional}}. Calling {{SerializableOptional#map}} will returns a
> {{Optional}}, which might surprise contributors if they want to chain
> operations and get a {{SerializableOptional}} as final result(to another
> transport maybe).
> Semantically return value of {{SerializableOptional#map}} should be
> {{SerializableOptional}}, and for interoperation, we could introduce a
> {{SerializableOptional#toOptional}} which easily adapt to the correct type.
> cc the original author [~till.rohrmann]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)