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

ASF GitHub Bot commented on FLINK-3971:
---------------------------------------

GitHub user gallenvara opened a pull request:

    https://github.com/apache/flink/pull/2049

    [FLINK-3971] [tableAPI] Aggregates handle null values incorrectly.

    Thanks for contributing to Apache Flink. Before you open your pull request, 
please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your 
pull request. For more information and/or questions please refer to the [How To 
Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful 
description of your changes.
    
    - [X] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira 
title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the 
JIRA id)
    
    - [X] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed
    
    Null-values-only aggregation handling in Max/Min/Average/Sum.

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

    $ git pull https://github.com/gallenvara/flink flink-3971

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

    https://github.com/apache/flink/pull/2049.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 #2049
    
----
commit cb39f098e5cea0867fc63c8661257cc9664a4882
Author: gallenvara <[email protected]>
Date:   2016-05-30T10:30:07Z

    Null-values-only aggregation handling.

----


> Aggregates handle null values incorrectly.
> ------------------------------------------
>
>                 Key: FLINK-3971
>                 URL: https://issues.apache.org/jira/browse/FLINK-3971
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API
>    Affects Versions: 1.1.0
>            Reporter: Fabian Hueske
>            Assignee: GaoLun
>            Priority: Critical
>             Fix For: 1.1.0
>
>
> Table API and SQL aggregates are supposed to ignore null values, e.g., 
> {{sum(1,2,null,4)}} is supposed to return {{7}}. 
> There current implementation is correct if at least one valid value is 
> present however, is incorrect if only null values are aggregated. {{sum(null, 
> null, null)}} should return {{null}} instead of {{0}}
> Currently only the Count aggregate handles the case of null-values-only 
> correctly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to