Github user cloud-fan commented on a diff in the pull request:
    --- Diff: 
    @@ -98,10 +99,20 @@ public UnsafeKVExternalSorter(
         } else {
    -      // The array will be used to do in-place sort, which require half of 
the space to be empty.
    -      // Note: each record in the map takes two entries in the array, one 
is record pointer,
    -      // another is the key prefix.
    -      assert(map.numKeys() * 2 <= map.getArray().size() / 2);
    +      // `BytesToBytesMap`'s point array is only guaranteed to hold all 
the distinct keys, but
    +      // `UnsafeInMemorySorter`'s point array need to hold all the 
entries. Since `BytesToBytesMap`
    --- End diff --
    yea, but it's not trivial, I'd like to do it later. The required change I 
can think of: `BytesToBytesMap` is actually a key -> list<value>, and we need 
to provide a way to iterate key -> list<value> instead of key -> value.


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to