Search in sources :

Example 1 with PredicateEvaluator

use of com.linkedin.pinot.core.operator.filter.predicate.PredicateEvaluator in project pinot by linkedin.

the class StarTreeIndexOperator method processFilterTree.

private void processFilterTree(FilterQueryTree childFilter) {
    String column = childFilter.getColumn();
    // Only equality predicates are supported
    Predicate predicate = Predicate.newPredicate(childFilter);
    Dictionary dictionary = segment.getDataSource(column).getDictionary();
    PredicateEntry predicateEntry = null;
    PredicateEvaluator predicateEvaluator = PredicateEvaluatorProvider.getPredicateFunctionFor(predicate, dictionary);
    // true.
    if (predicateEvaluator.alwaysFalse()) {
        emptyResult = true;
    }
    // Store this predicate, we will have to apply it later
    predicateEntry = new PredicateEntry(predicate, predicateEvaluator);
    predicateColumns.add(column);
    predicatesMap.put(column, predicateEntry);
}
Also used : Dictionary(com.linkedin.pinot.core.segment.index.readers.Dictionary) PredicateEvaluator(com.linkedin.pinot.core.operator.filter.predicate.PredicateEvaluator) Predicate(com.linkedin.pinot.core.common.Predicate)

Aggregations

Predicate (com.linkedin.pinot.core.common.Predicate)1 PredicateEvaluator (com.linkedin.pinot.core.operator.filter.predicate.PredicateEvaluator)1 Dictionary (com.linkedin.pinot.core.segment.index.readers.Dictionary)1