tisonkun commented on code in PR #75:
URL: https://github.com/apache/datasketches-rust/pull/75#discussion_r2709342025
##########
datasketches/src/cpc/pair_table.rs:
##########
Review Comment:
We may not implement the `merge` function as the Java/C++ impl for PairTable
but find another way to do the two-way merge. This is because in Rust, it's
impossible to hold a mutable ref when an immutable ref is still in used, which
is how `PairTable::merge` is used in practice:
```java
PairTable.merge(srcPairArr, 0, srcNumPairs,
allPairs, srcNumPairs, numPairsFromArray,
allPairs, 0); // note the overlapping subarray trick
```
The real effect here is to perform a two-way merge of
`allPairs[srcNumPairs..numPairsFromArray]` and `srcPairArr`. There should be a
more proper way to do this in Rust.
--
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]