[
https://issues.apache.org/jira/browse/FLINK-3566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177921#comment-15177921
]
ASF GitHub Bot commented on FLINK-3566:
---------------------------------------
GitHub user twalthr opened a pull request:
https://github.com/apache/flink/pull/1759
[FLINK-3566] [FLINK-3563] Input type validation improvements
This PR fixes issues with the input type validation.
[FLINK-3566] Custom type information have been interpreted as basic or
tuple types, because their `isTupleType()`/`isBasicType()` methods returned
`true`. Subclasses of GenericTypes caused problems.
[FLINK-3563] Subclasses of GenericTypes caused problems.
@gyfora Can you check if you still have problems?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/twalthr/flink FLINK-3563
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1759.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 #1759
----
commit fe8ae3789f9260b48ac8a7551dd42b258c117b5f
Author: twalthr <[email protected]>
Date: 2016-03-03T14:44:28Z
[FLINK-3566] [FLINK-3563] Input type validation improvements
----
> Input type validation often fails on custom TypeInfo implementations
> --------------------------------------------------------------------
>
> Key: FLINK-3566
> URL: https://issues.apache.org/jira/browse/FLINK-3566
> Project: Flink
> Issue Type: Bug
> Components: Type Serialization System
> Reporter: Gyula Fora
> Assignee: Timo Walther
>
> Input type validation often fails when used with custom type infos. One
> example of this behaviour can be reproduced by creating a custom type info
> with our own field type:
> StreamExecutionEnvironment env =
> StreamExecutionEnvironment.getExecutionEnvironment();
> env.generateSequence(1, 10).map(new MapFunction<Long,
> Tuple1<Optional<Long>>>() {
> @Override
> public Tuple1<Optional<Long>> map(Long value) throws
> Exception {
> return Tuple1.of(Optional.of(value));
> }
> }).returns(new TupleTypeInfo<>(new
> OptionTypeInfo<Long>(BasicTypeInfo.LONG_TYPE_INFO)))
> .keyBy(new KeySelector<Tuple1<Optional<Long>>,
> Optional<Long>>() {
> @Override
> public Optional<Long>
> getKey(Tuple1<Optional<Long>> value) throws Exception {
> return value.f0;
> }
> });
> This will fail on Input type validation at the KeySelector (or any other
> function for example a mapper) with the following exception:
> Input mismatch: Basic type expected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)