private boolean evaluateEntry(IndexInfo indexInfo, ExecutionContext context, Object keyVal)
      throws FunctionDomainException, TypeMismatchException, NameResolutionException,
      QueryInvocationTargetException {
    CompiledValue path = indexInfo._path();
    Object left = path.evaluate(context);
    CompiledValue key = indexInfo._key();
    Object right = null;

    // For CompiledUndefined indexInfo has null key.
    if (keyVal == null && key == null) {
      return left == QueryService.UNDEFINED;
    }

    if (key != null) {
      right = key.evaluate(context);
    } else {
      right = keyVal;
    }

    int operator = indexInfo._operator();
    if (left == null && right == null) {
      return Boolean.TRUE;
    } else {
      return (Boolean) TypeUtils.compare(left, right, operator);
    }
  }
This evaluates the left and right side of a where condition for which this Index was used.
Like, if condition is "ID > 1", {@link IndexInfo} will contain Left as ID, Right as '1' and
operator as TOK_GT. This method will evaluate ID from region entry value and verify the ID > 1.

Note: IndexInfo is created for each query separately based on the condition being evaluated
using the Index.

@return true if RegionEntry value satisfies the where condition (contained in IndexInfo).
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java