[ https://issues.apache.org/jira/browse/FLINK-7452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16143937#comment-16143937 ]
ASF GitHub Bot commented on FLINK-7452: --------------------------------------- GitHub user twalthr opened a pull request: https://github.com/apache/flink/pull/4612 [FLINK-7452] [types] Add helper methods for all built-in Flink types ## What is the purpose of the change This PR provides an unified, detailed, and easy to use utility to work with Flink's built-in Java types. This class helps users to get an overview about built-in Flink types and their features/limitations (esp. regarding null support). ## Brief change log Improved `org.apache.flink.api.common.typeinfo.Types`. ## Verifying this change This change is a trivial rework / code cleanup 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)`: yes - 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 ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? JavaDocs You can merge this pull request into a Git repository by running: $ git pull https://github.com/twalthr/flink FLINK-7452 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/4612.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4612 ---- commit 2e027ed3c4671363f7023dd9faf7ba0d0c827312 Author: twalthr <twal...@apache.org> Date: 2017-08-28T12:13:07Z [FLINK-7452] [types] Add helper methods for all built-in Flink types to Types ---- > Add helper methods for all built-in Flink types to Types > -------------------------------------------------------- > > Key: FLINK-7452 > URL: https://issues.apache.org/jira/browse/FLINK-7452 > Project: Flink > Issue Type: Improvement > Components: Type Serialization System > Reporter: Timo Walther > Assignee: Timo Walther > > Sometimes it is very difficult to provide `TypeInformation` manually, in case > some extraction fails or is not available. {{TypeHint}}s should be the > preferred way but this methods can ensure correct types. > I propose to add all built-in Flink types to the {{Types}}. Such as: > {code} > Types.POJO(MyPojo.class) > Types.POJO(Map<String, TypeInformation>) > Types.GENERIC(Object.class) > Types.TUPLE(TypeInformation, ...) > Types.MAP(TypeInformation, TypeInformation) > {code} > The methods should validate that the returned type is exactly the requested > type. And especially in case of POJO should help creating {{PojoTypeInfo}}. > Once this is in place, we can deprecate the {{TypeInfoParser}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)