You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/13 08:55:42 UTC
[GitHub] [flink] TisonKun opened a new pull request #8724:
[FLINK-12822][apis] Add explicit transformer from SerializableOptional to
Optional
TisonKun opened a new pull request #8724: [FLINK-12822][apis] Add explicit transformer from SerializableOptional to Optional
URL: https://github.com/apache/flink/pull/8724
## What is the purpose of the change
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.
## Brief change log
- Change return type of `SerializableOptional#map` to `SerializableOptional`
- Add method `SerializableOptional#toOptional`
- Adapt invocations.
## Verifying this change
This change is a trivial rework without any test coverage.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
cc @tillrohrmann
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services