nchammas commented on code in PR #45036:
URL: https://github.com/apache/spark/pull/45036#discussion_r1491975003


##########
core/src/test/scala/org/apache/spark/util/collection/OpenHashMapSuite.scala:
##########
@@ -249,4 +249,34 @@ class OpenHashMapSuite extends SparkFunSuite with Matchers 
{
     map(null) = null
     assert(map.get(null) === Some(null))
   }
+
+  test("SPARK-45599: 0.0 and -0.0 should count distinctly") {
+    // Exactly these elements provided in roughly this order trigger a 
condition where lookups of
+    // 0.0 and -0.0 in the bitset happen to collide, causing their counts to 
be merged incorrectly
+    // and inconsistently if `==` is used to check for key equality.

Review Comment:
   I tweaked the test name. Is that what you had in mind?
   
   This comment explains why we need exactly the following elements to trigger 
the 0.0/-0.0 miscount. It doesn't always happen (which is part of what kept 
this bug hidden for so long).



-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to