[
https://issues.apache.org/jira/browse/FLINK-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204823#comment-14204823
]
Chesnay Schepler commented on FLINK-1227:
-----------------------------------------
if i change the code to
{code:java}
public static class MySel<X> implements KeySelector<X, Object>,
ResultTypeQueryable {
public TypeIiformation getProducedType() {
return getForObject(new Integer(0));
}
public Object getKey(Object value) throws Exception {
return 0;
}
{code}
it works with the current code. i should have played around a bit more before
making this PR, sorry.
can you explain to me why there's a difference between
{code:java}
public static class MySel<X> implements KeySelector<X, Object>,
ResultTypeQueryable {
{code}
and
{code:java}
public static class MySel implements KeySelector, ResultTypeQueryable {
{code}
? to me it seem like the KeySelector type in both cases is "some object".
> KeySelector can't implement ResultTypeQueryable
> -----------------------------------------------
>
> Key: FLINK-1227
> URL: https://issues.apache.org/jira/browse/FLINK-1227
> Project: Flink
> Issue Type: Improvement
> Components: Java API
> Affects Versions: 0.7.0-incubating
> Reporter: Chesnay Schepler
> Assignee: Chesnay Schepler
> Priority: Trivial
>
> The TypeExtractor currently doesn't check whether a KeySelector implements
> the ResultTypeQueryable interface.
> Since i expected it to work i guess you can call ti a clarity issue.
> Additionally, this change will allow me to use KeySelector for the Python API.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)