private PathAndKey getPathAndKey(ExecutionContext context)
      throws TypeMismatchException, AmbiguousNameException {
    // RuntimeIterator lIter = context.findRuntimeIterator(_left);
    // RuntimeIterator rIter = context.findRuntimeIterator(_right);
    boolean isLeftDependent = context.isDependentOnCurrentScope(_left);
    boolean isRightDependent = context.isDependentOnCurrentScope(_right);
    if ((isLeftDependent == false) == (isRightDependent == false)) {
      return null;
    }
    CompiledValue indexKey;
    CompiledValue path;
    if (isLeftDependent == false) {
      path = _right;
      indexKey = _left;
    } else {
      path = _left;
      indexKey = _right;
    }
    if (indexKey.isDependentOnCurrentScope(context)) {
      return null; // this check
    }
    // seems to be
    // redunant.
    return new PathAndKey(path, indexKey);
  }
get the path to see if there's an index for, and also determine which CompiledValue is the key
while we're at it
geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledComparison.java