GitHub user mtustin-handy opened a pull request:

    https://github.com/apache/spark/pull/12016

    [SPARK-14163][CORE] SumEvaluator and countApprox cannot reliably handle 
RDDs of size 1

    ## What changes were proposed in this pull request?
    
    This special cases 0 and 1 counts to avoid passing 0 degrees of freedom. 
    
    ## How was this patch tested?
    
    Tests run successfully. New test added. 
    
    ## Note:
    This recreates #11982 which was closed to due to non-updated diff. @rxin 
@srowen Commented there. 
    This also adds tests, reworks the code to perform the special casing (based 
on @srowen's comments), and adds equality machinery for BoundedDouble, as well 
as changing how it is transformed to string. 

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

    $ git pull https://github.com/mtustin-handy/spark SPARK-14163

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

    https://github.com/apache/spark/pull/12016.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 #12016
    
----
commit 3b26826f32b95f661991d1dc08b9a087a8779f63
Author: Marcin Tustin <[email protected]>
Date:   2016-03-26T23:32:23Z

    Use confidence when count is 1.
    
    Work with me in New York? 
https://www.handy.com/careers/73115?gh_jid=73115&gh_src=o5qcxn

commit 3faecc4f18094686c843060a1e53b81b9e04e75d
Author: Marcin Tustin <[email protected]>
Date:   2016-03-26T23:50:32Z

    Set infinite confidence if count is 1 or otherwise confidence would be NaN.
    Add test + equality methods for BoundedDouble
    
    Work with me in NYC: 
https://www.handy.com/careers/73115?gh_jid=73115&gh_src=o5qcxn

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to