[
https://issues.apache.org/jira/browse/FLINK-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884272#comment-15884272
]
Aljoscha Krettek commented on FLINK-5914:
-----------------------------------------
The reason for the {{WindowFunction}} input type (which is also the
{{AggregateFunction}} result type) being different from the {{WindowFunction}}
result type is to allow the user to enrich the result from the
{{AggregateFunction}} with meta information about the window firing that is
only available to the {{WindowFunction}} or {{ProcessWindowFunction}}. Right
now, the only meta information available is the {{Window}} for which this
firing is happening but in the future this will be extended with, for example,
a lateness specification, the number of window firings, etc.
What's the reason for wanting to remove the result/intermediate type? I think
it would only restrict what a user can do and this restriction was considered a
bug for {{fold()}}: FLINK-3869.
> remove aggregateResultType from streaming.api.datastream.aggregate
> ------------------------------------------------------------------
>
> Key: FLINK-5914
> URL: https://issues.apache.org/jira/browse/FLINK-5914
> Project: Flink
> Issue Type: Improvement
> Components: DataStream API
> Reporter: Shaoxuan Wang
> Assignee: Shaoxuan Wang
>
> aggregateResultType does not seem necessary for
> streaming.api.datastream.aggregate. We will anyway not serialize the
> aggregateResult between aggregate and window function. Aggregate function
> itself provides a function to getResult(), window function here should just
> emit the same results as aggregate output. So aggregateResultType should be
> same as resultType. I think we can safely remove aggregateResultType, thereby
> user will not have to provide two same types for the
> streaming.api.datastream.aggregate.
> [~StephanEwen], what do you think?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)