iverase commented on a change in pull request #486: URL: https://github.com/apache/lucene/pull/486#discussion_r762043648
########## File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java ########## @@ -495,57 +495,63 @@ private int balanceTreeNodePosition( } @Override - public void visitDocIDs(PointValues.IntersectVisitor visitor) throws IOException { + public void visitDocIDs(DocIdsVisitor docIDVisitor) throws IOException { resetNodeDataPosition(); - addAll(visitor, false); + addAll(docIDVisitor); } - public void addAll(PointValues.IntersectVisitor visitor, boolean grown) throws IOException { - if (grown == false) { - final long size = size(); - if (size <= Integer.MAX_VALUE) { - visitor.grow((int) size); - grown = true; - } - } + public void addAll(DocIdsVisitor docIdsVisitor) throws IOException { if (isLeafNode()) { // Leaf node leafNodes.seek(getLeafBlockFP()); // How many points are stored in this leaf cell: int count = leafNodes.readVInt(); - // No need to call grow(), it has been called up-front - DocIdsWriter.readInts(leafNodes, count, visitor); + // No need to call grow(), it has been called docIdVisitor-front Review comment: Actually I remove it all together. the BKDReader knows nothing about grow() any longer -- 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