public SelectResults evaluateCollection(ExecutionContext context) throws FunctionDomainException,
      TypeMismatchException, NameResolutionException, QueryInvocationTargetException {
    if (collection != UNINITIALIZED
        && !cmpIteratorDefn.isDependentOnAnyIteratorOfScopeLessThanItsOwn(context)
        && scopeID != IndexCreationHelper.INDEX_QUERY_SCOPE_ID) {
      return collection;
    }
    // limit the scope for evaluation to this RuntimeIterator:
    // we don't want to use this iterator or subsequent ones in the from clause
    // to evaluate this collection.
    collection = cmpIteratorDefn.evaluateCollection(context, this);
    if (collection == null) {
      return null;
    }
    // if we already have a more specific elementType, set it in the collection
    if (!elementType.equals(TypeUtils.OBJECT_TYPE)) {
      collection.setElementType(elementType);
    } else {
      // The elementType in the Collection obtained is more specific . So use that type.
      elementType = collection.getCollectionType().getElementType();
    }
    return collection;
  }
(Re)evaluate in the context of the current iterations through the cross-product. If this
iterator is not dependent on the current iteration, then just return the previously evaluated
collection. Otherwise, re-evaluate. Returns null if the collection itself is null or UNDEFINED
geode-core/src/main/java/org/apache/geode/cache/query/internal/RuntimeIterator.java