GitHub user namanmishra91 opened a pull request:

    https://github.com/apache/zeppelin/pull/2696

    [ZEPPELIN-3091] Correct aggregation functionality in charts

    ### What is this PR for?
    The aggregation functions interpret NaN columns as 1 which leads to 
incorrect output being shown in charts. This PR fixes this by correcting the 
sum, min, max and average aggregation method.
    
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-3091
    
    ### How should this be tested?
    * Update the data field of a paragraph results with %table to contain null 
values, e.g.
    `"data": 
"age\tvalue\n19\t4\n20\t3\n21\t7\n22\t9\n23\t20\n24\t24\n25\t44\n26\t77\n27\t94\n28\t103\n29\t97\n20\t5\n20\tnull\n"`
    
    The "null" values should be ignored for sum, min, max but included for 
count (and hence average).
    
    ### Screenshots (if appropriate)
    
![correct_sum](https://user-images.githubusercontent.com/6438072/33609178-14e05988-d9ed-11e7-9f1b-99e0141c5153.png)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No


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

    $ git pull https://github.com/namanmishra91/zeppelin ZEPPELIN-3091

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

    https://github.com/apache/zeppelin/pull/2696.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 #2696
    
----
commit 568ae3f2ab5d63b088c7f625bacfee71ebbda10d
Author: Naman Mishra <namanmishra1...@gmail.com>
Date:   2017-12-05T13:10:07Z

    Correct aggregation functionality in charts

----


---

Reply via email to