iverase commented on a change in pull request #1212: LUCENE-9176: Handle the
case when there is only one leaf node in TestEstimatePointCount
URL: https://github.com/apache/lucene-solr/pull/1212#discussion_r371113107
##########
File path:
lucene/core/src/test/org/apache/lucene/codecs/lucene60/TestLucene60PointsFormat.java
##########
@@ -132,7 +132,7 @@ public void testEstimatePointCount() throws IOException {
PointValues points = lr.getPointValues("f");
// If all points match, then the point count is numLeaves *
maxPointsInLeafNode
- final int numLeaves = (int) Math.ceil((double) points.size() /
maxPointsInLeafNode);
+ final int numLeaves = (int) Math.max(Math.ceil((double) points.size() /
maxPointsInLeafNode), 1);
Review comment:
Yes, you are right, I reverted that change.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]