romseygeek commented on code in PR #16295:
URL: https://github.com/apache/lucene/pull/16295#discussion_r3518333446
##########
lucene/core/src/test/org/apache/lucene/search/TestSkipBlockRangeIteratorIntoBitSet.java:
##########
@@ -818,6 +818,45 @@ private void doTestSortedNumericRangeIntoBitSet(
}
}
+ public void testSingletonDelegatesRangeIntoBitSet() throws Exception {
+ int numDocs = 4096 * 4;
+ try (Directory dir = newDirectory()) {
+ IndexWriterConfig conf = new IndexWriterConfig();
+ conf.setCodec(new Lucene104Codec());
+ try (IndexWriter writer = new IndexWriter(dir, conf)) {
+ for (int i = 0; i < numDocs; i++) {
+ Document doc = new Document();
+ long value = i % 100;
+ doc.add(NumericDocValuesField.indexedField("numeric", value));
+ doc.add(SortedNumericDocValuesField.indexedField("sorted_numeric",
value));
+ writer.addDocument(doc);
+ }
+ writer.forceMerge(1);
+ }
+ try (DirectoryReader reader = DirectoryReader.open(dir)) {
+ for (LeafReaderContext ctx : reader.leaves()) {
+ int maxDoc = ctx.reader().maxDoc();
+
+ FixedBitSet fromNumeric = new FixedBitSet(maxDoc);
+ ctx.reader()
+ .getNumericDocValues("numeric")
+ .rangeIntoBitSet(0, maxDoc, 20, 40, fromNumeric, 0);
+
+ FixedBitSet fromSingleton = new FixedBitSet(maxDoc);
+ ctx.reader()
+ .getSortedNumericDocValues("sorted_numeric")
+ .rangeIntoBitSet(0, maxDoc, 20, 40, fromSingleton, 0);
+
+ assertEquals(
Review Comment:
Looking at this again... I'm not sure this is really testing the delegation?
Would the test fail if we weren't delegating?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]