klsince commented on code in PR #9257:
URL: https://github.com/apache/pinot/pull/9257#discussion_r951015588
##########
pinot-core/src/test/java/org/apache/pinot/core/operator/combine/SelectionCombineOperatorTest.java:
##########
@@ -184,7 +185,20 @@ public void testSelectionOnly() {
assertEquals(combineResult.getNumEntriesScannedPostFilter(),
numDocsScanned);
assertEquals(combineResult.getNumSegmentsProcessed(), NUM_SEGMENTS);
assertEquals(combineResult.getNumConsumingSegmentsProcessed(),
NUM_CONSUMING_SEGMENTS);
- assertEquals(combineResult.getNumConsumingSegmentsMatched(), 0);
+ // The check below depends on the order of segment processing. When
segments# <= 10 (the value of
+ // CombinePlanNode.TARGET_NUM_PLANS_PER_THREAD to be specific), the
segments are processed in the order as they
+ // are prepared, which is OFFLINE segments followed by RT segments and
this case makes the value here equal to 0.
+ // But when segments# > 10, the segments are processed in a different
order and some RT segments can be processed
+ // ahead of the other OFFLINE segments. In specific, half of the RT
segments can be processed.
+ if (NUM_SEGMENTS <= 10) {
+ assertEquals(combineResult.getNumConsumingSegmentsMatched(), 0, String
+ .format("NumConsumingSegmentsMatched: %d, NumSegments: %d",
combineResult.getNumConsumingSegmentsMatched(),
+ NUM_SEGMENTS));
+ } else {
+ assertEquals(combineResult.getNumConsumingSegmentsMatched(),
NUM_CONSUMING_SEGMENTS / 2, String
Review Comment:
👌
--
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]