private ObjectType computeElementType(ExecutionContext context) throws AmbiguousNameException {
    ObjectType type = PathUtils.computeElementTypeOfExpression(context, collectionExpr);
    // if it's a Map, we want the Entry type, not the value type
    if (type.isMapType()) {
      return ((MapType) type).getEntryType();
    }
    if (type.isCollectionType()) { // includes Regions and arrays
      return ((CollectionType) type).getElementType();
    }
    return type;
  }
TODO: We need to implement the below method of computeDependencies Once we come to implement
changes for partitioned region querying, as in that case if first iterator itself is a Select
Query , then ideally we cannot call that CompiledIteratorDef independent ( which will be the
case at present). When we use this commented function we will also need to take care of
correctly implementing the function isDependentOnCurrentScope etc functions.
geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledIteratorDef.java