WangGuangxin commented on code in PR #38722:
URL: https://github.com/apache/spark/pull/38722#discussion_r1027903483


##########
core/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java:
##########
@@ -812,9 +812,7 @@ public boolean append(Object kbase, long koff, int klen, 
Object vbase, long voff
 
         // If the map has reached its growth threshold, try to grow it.
         if (numKeys >= growthThreshold) {
-          // We use two array entries per key, so the array size is twice the 
capacity.
-          // We should compare the current capacity of the array, instead of 
its size.
-          if (longArray.size() / 2 < MAX_CAPACITY) {
+          if (longArray.size() < MAX_CAPACITY) {

Review Comment:
   yes, I think you are right, I misunderstood this. close it



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to