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

Fabian Hueske commented on FLINK-5957:
--------------------------------------

That was our initial approach, but it turned out that the TypeExtractor does 
not handle Scala "Primitives" (Int, Long) in Java Tuples very well.
There were also other issues related to generic types. I expect these issue to 
come up for user-defined aggregates as well. 

Therefore, we decided to have an optional {{getAccumulatorType()}} method. If 
not implemented, the {{AggregateUtil}} will try to infer the accumulator type 
from the instance returned by {{AggregateFunction.createAccumulator()}} with 
{{TypeInformation.of()}}.



> Remove  `getAccumulatorType` method from `AggregateFunction`
> ------------------------------------------------------------
>
>                 Key: FLINK-5957
>                 URL: https://issues.apache.org/jira/browse/FLINK-5957
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> Build-in aggregateFunction need not implement the  `getAccumulatorType` 
> method. 
> We can get TypeInformation by  `TypeInformation.of() ` or 
> `TypeInformation.of(new TypeHint[AGG.type](){})`. 
> What do you think? [~fhueske] [~shaoxuan] 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to