[
https://issues.apache.org/jira/browse/FLINK-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14291852#comment-14291852
]
Gyula Fora commented on FLINK-1450:
-----------------------------------
It is actually something quite different.
With reduce you reduce 2 values of the same type to 1.
With fold you take an initial value of arbitrary type and you write a function
that takes as input 2 paramaters, 1 of the type of the datastream/set and 1 of
the initial value type. And the function outputs a new value of this arbitrary
type
This is actually more similar to reduceGroup but you cannot reduce the whole
stream at once so thats not applicable in the streaming api.
> Add Fold operator to the Streaming api
> --------------------------------------
>
> Key: FLINK-1450
> URL: https://issues.apache.org/jira/browse/FLINK-1450
> Project: Flink
> Issue Type: New Feature
> Components: Streaming
> Affects Versions: 0.9
> Reporter: Gyula Fora
> Priority: Minor
> Labels: starter
>
> The streaming API currently doesn't support a fold operator.
> This operator would work as the foldLeft method in Scala. This would allow
> effective implementations in a lot of cases where a the simple reduce is
> inappropriate due to different return types.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)