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

Martin Junghanns commented on FLINK-3118:
-----------------------------------------

I also tried that and let {{MessageFunction}} implement {{Function}}. I wanted 
to use {{getUnaryOperatorReturnType}}. Problem here is that I don't know IN 
(IN1, IN2 resp.) which are used before checking for the {{ResultTypeQuerable}} 
interface. I could switch those lines in the {{TypeExtractor}}, e.g.

now (in {{TypeExtractor.getUnaryOperatorReturnType}}
{code}
validateInputType(baseClass, function.getClass(), 0, inType);
if(function instanceof ResultTypeQueryable) {
    return ((ResultTypeQueryable<OUT>) function).getProducedType();
}
return new TypeExtractor().privateCreateTypeInfo(baseClass, 
function.getClass(), 1, inType, null);
{code}
would change to
{code}
if(function instanceof ResultTypeQueryable) {
    return ((ResultTypeQueryable<OUT>) function).getProducedType();
}
validateInputType(baseClass, function.getClass(), 0, inType);
return new TypeExtractor().privateCreateTypeInfo(baseClass, 
function.getClass(), 1, inType, null);
{code}

same applies to {{TypeExtractor.getBinaryOperatorReturnType}}.

That would work. Would it be ok, to use it this way?

> Check if MessageFunction implements ResultTypeQueryable
> -------------------------------------------------------
>
>                 Key: FLINK-3118
>                 URL: https://issues.apache.org/jira/browse/FLINK-3118
>             Project: Flink
>          Issue Type: Bug
>          Components: Gelly
>            Reporter: Martin Junghanns
>            Assignee: Martin Junghanns
>
> To generalize message values in vertex centric computations, it is necessary 
> to let the user define the {{TypeInformation}} via {{ResultTypeQueryable}}. 
> This needs to be checked in {{VertexCentricIteration}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to