private PathAndKey getPathAndKey(ExecutionContext context)
      throws TypeMismatchException, AmbiguousNameException {

    boolean isLeftDependent = context.isDependentOnCurrentScope(elm);
    boolean isRightDependent = context.isDependentOnCurrentScope(colln);
    if (!isLeftDependent || isRightDependent) {
      return null;
    }
    CompiledValue indexKey;
    CompiledValue path;
    path = elm;
    indexKey = colln;
    // Do not worry about the nature of the collection. As long as it
    // is not dependent on the current scope we should be fine

    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/CompiledIn.java