Copilot commented on code in PR #19038:
URL: https://github.com/apache/pinot/pull/19038#discussion_r3626820777


##########
pinot-core/src/test/java/org/apache/pinot/core/operator/filter/OrFilterOperatorTest.java:
##########
@@ -106,7 +109,7 @@ public void testComplex() {
     BlockDocIdIterator iterator = 
orOperator.nextBlock().getBlockDocIdSet().iterator();
     int docId;
     while ((docId = iterator.next()) != Constants.EOF) {
-      Assert.assertEquals(docId, expectedIterator.next().intValue());
+      assertEquals(docId, expectedIterator.next().intValue());
     }

Review Comment:
   This loop only checks that produced docIds match the expected sequence, but 
it doesn’t assert the OR iterator produced all expected docIds. Add an 
assertion after the loop to ensure the expected iterator is exhausted.



##########
pinot-core/src/test/java/org/apache/pinot/core/operator/filter/OrFilterOperatorTest.java:
##########
@@ -52,7 +55,7 @@ public void testUnionForTwoLists() {
     BlockDocIdIterator iterator = 
orOperator.nextBlock().getBlockDocIdSet().iterator();
     int docId;
     while ((docId = iterator.next()) != Constants.EOF) {
-      Assert.assertEquals(docId, expectedIterator.next().intValue());
+      assertEquals(docId, expectedIterator.next().intValue());
     }

Review Comment:
   The union assertions only compare elements while the OR iterator produces 
docIds; if the operator returns a correct prefix but stops early, this test 
will still pass. Add an assertion after the loop to ensure the expected 
iterator is fully consumed.



##########
pinot-core/src/test/java/org/apache/pinot/core/operator/filter/OrFilterOperatorTest.java:
##########
@@ -77,7 +80,7 @@ public void testUnionForThreeLists() {
     BlockDocIdIterator iterator = 
orOperator.nextBlock().getBlockDocIdSet().iterator();
     int docId;
     while ((docId = iterator.next()) != Constants.EOF) {
-      Assert.assertEquals(docId, expectedIterator.next().intValue());
+      assertEquals(docId, expectedIterator.next().intValue());
     }

Review Comment:
   The union assertions only validate values emitted by the OR iterator; if it 
stops early (missing trailing docIds), the test can still pass. Add an 
assertion after the loop to verify the expected iterator has no remaining 
elements.



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

Reply via email to