stefanvodita commented on code in PR #14238: URL: https://github.com/apache/lucene/pull/14238#discussion_r1957977134
########## lucene/facet/src/test/org/apache/lucene/facet/range/TestDynamicRangeUtil.java: ########## @@ -285,6 +285,23 @@ private static void assertDynamicNumericRangeValidProperties( pairOffset += count; } + // The minimum/maximum of each range is actually the smallest/largest value + for (int pairOffset = 0, rangeIdx = 0; rangeIdx < mockDynamicRangeResult.size(); rangeIdx++) { + DynamicRangeUtil.DynamicRangeInfo rangeInfo = mockDynamicRangeResult.get(rangeIdx); + int count = rangeInfo.count(); + long min = Long.MAX_VALUE; + long max = Long.MIN_VALUE; + for (int i = pairOffset; i < pairOffset + count; i++) { Review Comment: Seeing the other change in this file - why isn't it applicable here? If we know the pairs are sorted, don't we also know where the min and the max are already? -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org