leerho commented on code in PR #546:
URL: https://github.com/apache/datasketches-java/pull/546#discussion_r1564175620
##########
src/main/java/org/apache/datasketches/quantilescommon/ItemsSketchSortedView.java:
##########
@@ -118,29 +114,35 @@ public int getNumRetained() {
}
@Override
- @SuppressWarnings("unchecked")
- public GenericPartitionBoundaries<T> getPartitionBoundaries(final int
numEquallySized,
+ public GenericPartitionBoundaries<T> getPartitionBoundariesFromPartSize(
+ final long nominalPartitionSize,
final QuantileSearchCriteria searchCrit) {
if (isEmpty()) { throw new
SketchesArgumentException(QuantilesAPI.EMPTY_MSG); }
- final long totalN = this.totalN;
- final int maxParts = (int) (totalN / Math.ceil(normRankErr *
PARTITIONING_ERROR_FACTOR) );
- final int svLen = cumWeights.length;
-
- if (numEquallySized > maxParts) {
+ final long partSizeItems = getMinPartitionSizeItems();
+ if (nominalPartitionSize < partSizeItems) {
Review Comment:
Fixed
--
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]