You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/08/17 15:00:25 UTC
[GitHub] [spark] srowen commented on a change in pull request #33629: [SPARK-36407][CORE][SQL] Convert int to long to avoid potential integer multiplications overflow risk
srowen commented on a change in pull request #33629:
URL: https://github.com/apache/spark/pull/33629#discussion_r690457392
##########
File path: core/src/test/java/org/apache/spark/util/collection/TestTimSort.java
##########
@@ -110,22 +110,22 @@ private static int minRunLength(int n) {
* @param X The sum of the sequence that should be added to runs.
*/
private static void generateJDKWrongElem(List<Long> runs, int minRun, long X) {
- for (long newTotal; X >= 2 * minRun + 1; X = newTotal) {
+ for (long newTotal; X >= 2L * minRun + 1; X = newTotal) {
Review comment:
My guess is this can't actually overflow for some reason, but I think it's OK, esp in a test. These look fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org