AlexanderSaydakov commented on code in PR #447:
URL: https://github.com/apache/datasketches-java/pull/447#discussion_r1287688123
##########
src/main/java/org/apache/datasketches/sampling/ReservoirItemsSketch.java:
##########
@@ -259,7 +259,7 @@ public static <T> ReservoirItemsSketch<T> heapify(final
Memory srcMem,
final int itemsToRead = (int) Math.min(k, itemsSeen);
final T[] data = serDe.deserializeFromMemory(
- srcMem.region(preLongBytes, srcMem.getCapacity() - preLongBytes),
itemsToRead);
+ srcMem.region(preLongBytes, srcMem.getCapacity() - preLongBytes), 0,
itemsToRead);
Review Comment:
It is not clear to me why this region is needed here. this new offset
parameter can be used instead. or, the other way around, why is this new offset
parameter needed, if we always can use a region?
--
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]