GitHub user kiszk opened a pull request:

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

    initial commit

    ## What changes were proposed in this pull request?
    
    This PR avoids possible overflow at an operation `long = (long)(int * 
int)`. The multiplication of large positive integer values may set one to MSB. 
This leads to a negative value in long while we expected a positive value (e.g. 
`0111_0000_0000_0000 * 0000_0000_0000_0010`).
    
    This PR performs long cast before the multiplication to avoid this 
situation.
    
    ## How was this patch tested?
    
    Existing UTs

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

    $ git pull https://github.com/kiszk/spark SPARK-23893

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

    https://github.com/apache/spark/pull/21002.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 #21002
    
----
commit ac24549d190a7c203d0a5a2e8f589b0ba797b0ba
Author: Kazuaki Ishizaki <ishizaki@...>
Date:   2018-04-07T14:16:18Z

    initial commit

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to