TisonKun created FLINK-12822:
--------------------------------
Summary: 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
Fix For: 1.9.0
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)