Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/16232
  
    @davies What I just said is not accurate. I don't meant the values have 
entry in the array. I meant each key/value pair will occupy two entries in the 
array.
    
    We iterator all key/value pairs in the `BytesToBytesMap` and call 
`UnsafeInMemorySorter.insertRecord` which inserts record pointer and key prefix 
for each key/value pair in 
https://github.com/apache/spark/blob/5857b9ac2d9808d9b89a5b29620b5052e2beebf5/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java#L241
    
    So you will have `map.numKeys() * 2` entries in the array because for each 
you will have one entry for record pointer and one entry for key prefix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to