flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-952) TypeExtractor requires the argument types of the UDF to be identical to the parameter types
Date Wed, 18 Jun 2014 17:50:26 GMT

    [ https://issues.apache.org/jira/browse/FLINK-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14036025#comment-14036025
] 

Stephan Ewen commented on FLINK-952:
------------------------------------

That is true, there is actually a reason for that:

The data is treated as the type declared in the signature, because the type analysis and serializer
generation happens at the "pre-flight" time. So if you have a MapFunction<A> and give
it a B (subclass of A), it will treat the B as an A at runtime.

> TypeExtractor requires the argument types of the UDF to be identical to the parameter
types
> -------------------------------------------------------------------------------------------
>
>                 Key: FLINK-952
>                 URL: https://issues.apache.org/jira/browse/FLINK-952
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>
> The TypeExtractor checks for each operation whether the DataSet element types are valid
arguments for the UDF. However, it checks for strict equality instead of a subtype relationship.
Thus the following computation would not work even though it should semantically be correct.
> DataSet[B].map(new MapFunction[A,A](){ A map(A x)}) with B being a sub class of A.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message