richardstartin commented on a change in pull request #7435:
URL: https://github.com/apache/pinot/pull/7435#discussion_r709633913
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/RangeIndexBasedFilterOperator.java
##########
@@ -51,74 +51,84 @@ public RangeIndexBasedFilterOperator(PredicateEvaluator
rangePredicateEvaluator,
@Override
protected FilterBlock getNextBlock() {
- RangeIndexReader rangeIndexReader = (RangeIndexReader)
_dataSource.getRangeIndex();
+ @SuppressWarnings("unchecked")
+ RangeIndexReader<ImmutableRoaringBitmap> rangeIndexReader =
+ (RangeIndexReader<ImmutableRoaringBitmap>) _dataSource.getRangeIndex();
assert rangeIndexReader != null;
+ ImmutableRoaringBitmap matches;
+ // if the implementation cannot match the entire query exactly, it will
+ // yield partial matches, which need to be verified by scanning. If it
+ // can answer the query exactly, this will be null.
+ ImmutableRoaringBitmap partialMatches;
int firstRangeId;
int lastRangeId;
if (_rangePredicateEvaluator instanceof
SortedDictionaryBasedRangePredicateEvaluator) {
- firstRangeId = rangeIndexReader
- .findRangeId(((SortedDictionaryBasedRangePredicateEvaluator)
_rangePredicateEvaluator).getStartDictId());
// NOTE: End dictionary id is exclusive in
OfflineDictionaryBasedRangePredicateEvaluator.
- lastRangeId = rangeIndexReader
- .findRangeId(((SortedDictionaryBasedRangePredicateEvaluator)
_rangePredicateEvaluator).getEndDictId() - 1);
+ matches = rangeIndexReader.getMatchingDocIds(
+ ((SortedDictionaryBasedRangePredicateEvaluator)
_rangePredicateEvaluator).getStartDictId(),
Review comment:
Why?
--
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]