gortiz commented on code in PR #10043: URL: https://github.com/apache/pinot/pull/10043#discussion_r1065799086
########## pinot-core/src/main/java/org/apache/pinot/core/operator/filter/RangeIndexBasedFilterOperator.java: ########## @@ -44,44 +53,74 @@ public class RangeIndexBasedFilterOperator extends BaseFilterOperator { private static final String EXPLAIN_NAME = "FILTER_RANGE_INDEX"; - private final RangeEvaluator _rangeEvaluator; - private final PredicateEvaluator _rangePredicateEvaluator; + static final Set<FieldSpec.DataType> SUPPORTED_RAW_DATA_TYPES = + EnumSet.of(FieldSpec.DataType.INT, FieldSpec.DataType.LONG, FieldSpec.DataType.FLOAT, FieldSpec.DataType.DOUBLE); + + private final RangeIndexReader<ImmutableRoaringBitmap> _rangeIndexReader; + private final PredicateEvaluator _predicateEvaluator; private final DataSource _dataSource; + private final FieldSpec.DataType _parameterType; + private final Object _parameters; private final int _numDocs; + static boolean canEvaluate(PredicateEvaluator predicateEvaluator, DataSource dataSource) { + if (dataSource.getRangeIndex() != null) { + boolean datatypeSupported = (predicateEvaluator.isDictionaryBased() || SUPPORTED_RAW_DATA_TYPES.contains( Review Comment: I would vote against removing these checks. They shouldn't be that heavy and as appointed by @richardstartin, they made the code easier to understand and even more resilient without an expected impact on performance. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org