kishoreg commented on a change in pull request #5952:
URL: https://github.com/apache/incubator-pinot/pull/5952#discussion_r483274857
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/FilterOperatorUtils.java
##########
@@ -49,25 +48,31 @@ public static BaseFilterOperator
getLeafFilterOperator(PredicateEvaluator predic
}
Predicate.Type predicateType = predicateEvaluator.getPredicateType();
- if (predicateType == Predicate.Type.RANGE) {
- if (dataSource.getDataSourceMetadata().isSorted()) {
- return new SortedIndexBasedFilterOperator(predicateEvaluator,
dataSource, numDocs);
- }
- if (dataSource.getRangeIndex() != null) {
- return new
RangeIndexBasedFilterOperator((OfflineDictionaryBasedRangePredicateEvaluator)
predicateEvaluator,
- dataSource, numDocs);
- }
- return new ScanBasedFilterOperator(predicateEvaluator, dataSource,
numDocs);
- } else if (predicateType == Predicate.Type.REGEXP_LIKE) {
- return new ScanBasedFilterOperator(predicateEvaluator, dataSource,
numDocs);
- } else {
- if (dataSource.getDataSourceMetadata().isSorted()) {
- return new SortedIndexBasedFilterOperator(predicateEvaluator,
dataSource, numDocs);
- }
- if (dataSource.getInvertedIndex() != null) {
- return new BitmapBasedFilterOperator(predicateEvaluator, dataSource,
numDocs);
- }
- return new ScanBasedFilterOperator(predicateEvaluator, dataSource,
numDocs);
+ switch (predicateType) {
Review comment:
Good job cleaning this up
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]