AlexanderSaydakov commented on code in PR #559:
URL: https://github.com/apache/datasketches-java/pull/559#discussion_r1597297960
##########
src/test/java/org/apache/datasketches/theta/SketchesTest.java:
##########
@@ -141,6 +143,10 @@ public void checkUtilMethods() {
final int maxCompSkBytes = getMaxCompactSketchBytes(k+1);
assertEquals(24+(k+1)*8, maxCompSkBytes);
+ final int compSkMaxBytes = getCompactSketchMaxBytes(k); {
+ assertEquals(compSkMaxBytes, ((k << 4) * 15) / 16 +
(Family.QUICKSELECT.getMaxPreLongs() << 3));
Review Comment:
I would suggest reusing the existing logic like this:
HeapQuickSelectSketch.setHashTableThreshold(lgK, lgK + 1) +
Family.QUICKSELECT.getMaxPreLongs()) * Long.BYTES
By the way, I noticed that the setHashTableThreshold() method is duplicated
in DirectQuickSelectSketch (not introduced by this PR)
--
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]