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 2022/10/09 18:42:13 UTC

[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #38182: [SPARK-40721][CORE] Use `||` instead of `|` in `TimSort`

dongjoon-hyun commented on code in PR #38182:
URL: https://github.com/apache/spark/pull/38182#discussion_r990824057


##########
core/src/main/java/org/apache/spark/util/collection/TimSort.java:
##########
@@ -788,7 +788,7 @@ private void mergeLo(int base1, int len1, int base2, int len2) {
           if (--len1 == 1)
             break outer;
           minGallop--;
-        } while (count1 >= MIN_GALLOP | count2 >= MIN_GALLOP);
+        } while (count1 >= MIN_GALLOP || count2 >= MIN_GALLOP);

Review Comment:
   Thank you. Actually, this was a copy of Android TimSort.java. I'm just curious if Android change like your proposal recently?
   - https://android.googlesource.com/platform/libcore/+/android-6.0.1_r77/luni/src/main/java/java/util/TimSort.java#749



-- 
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