gsmiller commented on code in PR #12334: URL: https://github.com/apache/lucene/pull/12334#discussion_r1212360862
########## lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java: ########## @@ -204,13 +200,21 @@ private void updateCompetitiveIterator() throws IOException { return; } if (reverse == false) { - encodeBottom(maxValueAsBytes); + if (queueFull) { // bottom is avilable only when queue is full + maxValueAsBytes = maxValueAsBytes == null ? new byte[bytesCount] : maxValueAsBytes; Review Comment: Oh, I see. Yes, that helps clarify. Thanks! The difference I missed is that we never start updating the competitive iterator until the queue fills in the current code, so it doesn't matter that these byte arrays are initialized as zeros, but now it does matter because `null` has meaning in the case of the competitive iterator update. OK got it. Thanks for walking me through it :) -- 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