@Override
  public SelectResults filterEvaluate(ExecutionContext context, SelectResults intermediateResults,
      boolean completeExpansionNeeded, CompiledValue iterOperands, RuntimeIterator[] indpndntItrs,
      boolean isIntersection, boolean conditioningNeeded, boolean evaluateProjAttrib)
      throws FunctionDomainException, TypeMismatchException, NameResolutionException,
      QueryInvocationTargetException {
    // this method is called if we are independent of the iterator,
    // or if we can use an index.
    // if we are independent, then we should not have been here in the first
    // place
    Support.Assert(_value.isDependentOnCurrentScope(context),
        "For a condition which does not depend on any RuntimeIterator of current scope , we should not have been in this function");
    IndexInfo[] idxInfo = getIndexInfo(context);
    ObjectType resultType = idxInfo[0]._index.getResultSetType();
    int indexFieldsSize = -1;
    SelectResults set = null;
    if (resultType instanceof StructType) {
      set = QueryUtils.createStructCollection(context, (StructTypeImpl) resultType);
      indexFieldsSize = ((StructTypeImpl) resultType).getFieldNames().length;
    } else {
      set = QueryUtils.createResultCollection(context, resultType);
      indexFieldsSize = 1;
    }
    int op = _is_defined ? TOK_NE : TOK_EQ;
    Object key = QueryService.UNDEFINED;
    QueryObserver observer = QueryObserverHolder.getInstance();
    try {
      observer.beforeIndexLookup(idxInfo[0]._index, op, key);
      context.cachePut(CompiledValue.INDEX_INFO, idxInfo[0]);
      idxInfo[0]._index.query(key, op, set, context);
    } finally {
      observer.afterIndexLookup(set);
    }
    return QueryUtils.getConditionedIndexResults(set, idxInfo[0], context, indexFieldsSize,
        completeExpansionNeeded, iterOperands, indpndntItrs);
  }
Asif : Evaluates as a filter taking advantage of indexes if appropriate. This function has a
meaningful implementation only in CompiledComparison & CompiledUndefined . It is unsupported in
other classes. The additional parameters which it takes are a boolean which is used to indicate
whether the index result set needs to be expanded to the top level or not. The second is a
CompiledValue representing the operands which are only iter evaluatable. The CompiledValue
passed will be null except if a GroupJunction has only one filter evaluatable condition & rest
are iter operands. In such cases , the iter operands will be evaluated while expanding/cutting
down the index resultset
geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledUndefined.java