You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/11/29 16:00:32 UTC

[GitHub] [lucene] iverase commented on a change in pull request #486: LUCENE-9619: Remove IntersectVisitor from PointsTree API

iverase commented on a change in pull request #486:
URL: https://github.com/apache/lucene/pull/486#discussion_r758504244



##########
File path: lucene/core/src/java/org/apache/lucene/index/PointValues.java
##########
@@ -323,10 +355,18 @@ default void grow(int count) {}
    */
   public final void intersect(IntersectVisitor visitor) throws IOException {
     final PointTree pointTree = getPointTree();
-    intersect(visitor, pointTree);
+    intersect(wrapIntersectVisitor(visitor), pointTree);
     assert pointTree.moveToParent() == false;
   }
 
+  /**
+   * Adds the possibility of wrapping a provided {@link IntersectVisitor} in {@link
+   * #intersect(IntersectVisitor)}.
+   */
+  protected IntersectVisitor wrapIntersectVisitor(IntersectVisitor visitor) throws IOException {
+    return visitor;
+  }

Review comment:
       This added this entry point in order to wrap IntersectVisitor with an AssertingIntersectVisitor during testing. I don't really like it but the only other option is to make intersects method not final which I didn't like it either.




-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org