You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/26 22:43:00 UTC

[jira] [Commented] (SAMZA-1473) Fix handling of initial values in windows with aggregating functions

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

ASF GitHub Bot commented on SAMZA-1473:
---------------------------------------

GitHub user vjagadish1989 opened a pull request:

    https://github.com/apache/samza/pull/343

    SAMZA-1473 Fix handling of initial values for aggregating windows

    - Handle initial values for windows with foldLeftFunctions configured
    - Improve trace level logging

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

    $ git pull https://github.com/vjagadish1989/samza aggregating-window-fix

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

    https://github.com/apache/samza/pull/343.patch

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

    This closes #343
    
----
commit a578577e7292fbcef8690d49fce91789c94436b6
Author: Jagadish <jv...@linkedin.com>
Date:   2017-10-19T02:19:10Z

    timeseries store fix for aggregating windows

commit fd36167dba0d86858a84bae3dec3b2437b72773b
Author: Jagadish <jv...@linkedin.com>
Date:   2017-10-26T03:31:51Z

    Add an unit test for testing behavior

commit 78afd11930d9aca4f9fa047a54dede7215f1d2ab
Author: Jagadish <jv...@linkedin.com>
Date:   2017-10-26T22:40:17Z

    Revert unnecessary commits

----


> Fix handling of initial values in windows with aggregating functions
> --------------------------------------------------------------------
>
>                 Key: SAMZA-1473
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1473
>             Project: Samza
>          Issue Type: Sub-task
>            Reporter: Jagadish
>
> Currently, we assert that tumbling windows that have a FoldLeftFunction configured should only have exactly one message in their window-panes. However, this is not true during window initialization (when the windowpane is first constructed and the store does not contain any previous state for the window.)
> The correct check should be as follows:
> {code}
>       Object oldVal = existingState.size() == 0 ? initializer.get() : existingState.get(0);
> {code}
> If there is no state, we'll use the initial state. If there is previous state, we'll use its value.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)