shubhamsrkdev commented on code in PR #14676:
URL: https://github.com/apache/lucene/pull/14676#discussion_r2095293465


##########
lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java:
##########
@@ -2599,4 +2599,33 @@ public void 
testPointInSetQuerySkipsNonMatchingSegments() throws IOException {
     w.close();
     dir.close();
   }
+
+  public void testOutOfOrderValuesInPointInSetQuery() throws Exception {
+    IllegalArgumentException expected =
+        expectThrows(
+            IllegalArgumentException.class,
+            () -> {
+              new PointInSetQuery(
+                  "foo",
+                  1,
+                  1,
+                  new PointInSetQuery.Stream() {
+                    private final BytesRef[] values = {
+                      newBytesRef(new byte[] {2}), newBytesRef(new byte[] {1}) 
// out of order
+                    };
+                    int index = 0;
+
+                    @Override
+                    public BytesRef next() {
+                      return index < values.length ? values[index++] : null;
+                    }
+                  }) {
+                @Override
+                protected String toString(byte[] point) {

Review Comment:
   The `PointInSetQuery` is an abstract class. Following the pattern from 
[here](https://github.com/apache/lucene/blob/b2547588f1672db162158161cf00085300371c5e/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java#L2064)



-- 
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

Reply via email to