flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3869) WindowedStream.apply with FoldFunction is too restrictive
Date Sun, 20 Nov 2016 09:55:59 GMT

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

ASF GitHub Bot commented on FLINK-3869:

GitHub user ymarzougui opened a pull request:


    [FLINK-3869] WindowedStream.apply with FoldFunction is too restrictive

    This pull request removes the restriction that a WindowFunction in a fold/apply should
emit the same type as the accumulator type of the fold. It brings the following changes to
the Java and Scala APIs:
    - Deprecating `apply(ReduceFunction, WindowFunction)` and the restrictive `apply(Initial,
FoldFunction, WindowFunction)` methods.
    - Replacing them with two methods : `reduce(ReduceFunction, WindowFunction)` and a non-restrictive
`fold(Initial, FoldFunction, WindowFunction)`.
    - Changing some test classes to use the new methods.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ymarzougui/flink FLINK-3869

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2835
commit df65335dd2193d8a2b956085b0f375db5eb75863
Author: Yassine Marzougui <y.marzougui@mindlytix.com>
Date:   2016-11-19T23:19:10Z

    [FLINK-3869] WindowedStream.apply with FoldFunction is too restrictive


> WindowedStream.apply with FoldFunction is too restrictive
> ---------------------------------------------------------
>                 Key: FLINK-3869
>                 URL: https://issues.apache.org/jira/browse/FLINK-3869
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: Aljoscha Krettek
>            Assignee: Yassine Marzougui
> Right now we have this signature:
> {code}
> public <R> SingleOutputStreamOperator<R> apply(R initialValue, FoldFunction<T,
R> foldFunction, WindowFunction<R, R, K, W> function) {
> {code}
> but we should have this signature to allow users to return a type other than the fold
accumulator type from their window function:
> {code}
> public <ACC, R> SingleOutputStreamOperator<R> apply(ACC initialValue, FoldFunction<T,
ACC> foldFunction, WindowFunction<ACC, R, K, W> function) {
> {code}

This message was sent by Atlassian JIRA

View raw message