-
- Downloads
[SPARK-18458][CORE] Fix signed integer overflow problem at an expression in RadixSort.java
## What changes were proposed in this pull request? This PR avoids that a result of an expression is negative due to signed integer overflow (e.g. 0x10?????? * 8 < 0). This PR casts each operand to `long` before executing a calculation. Since the result is interpreted as long, the result of the expression is positive. ## How was this patch tested? Manually executed query82 of TPC-DS with 100TB Author: Kazuaki Ishizaki <ishizaki@jp.ibm.com> Closes #15907 from kiszk/SPARK-18458. (cherry picked from commit d93b6552) Signed-off-by:Reynold Xin <rxin@databricks.com>
Showing
- core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java 25 additions, 23 deletions...g/apache/spark/util/collection/unsafe/sort/RadixSort.java
- core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java 1 addition, 1 deletion...ark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
- core/src/test/scala/org/apache/spark/util/collection/unsafe/sort/RadixSortSuite.scala 14 additions, 14 deletions...he/spark/util/collection/unsafe/sort/RadixSortSuite.scala
Please register or sign in to comment