/** * Evaluate just the collectionExpr * * @param stopAtIter the RuntimeIterator associated with this iterator defn -- don't use this or * any subsequent runtime iterators to evaluate. */ SelectResults evaluateCollection(ExecutionContext context, RuntimeIterator stopAtIter) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { Object coll; context.currentScope().setLimit(stopAtIter); try { coll = this.collectionExpr.evaluate(context); } finally { context.currentScope().setLimit(null); } // if we don't have an elementType and there's a typecast, apply the // element type here if (TypeUtils.OBJECT_TYPE.equals(this.elementType)) { ObjectType elmTypc = getCollectionElementTypeCast(); if (elmTypc != null) { this.elementType = elmTypc; } } // PR bucketRegion substitution should have already happened // at the expression evaluation level return prepareIteratorDef(coll, this.elementType, context); }