private ObjectType getFieldTypeOfProjAttrib(ExecutionContext context, CompiledValue cv)
      throws TypeMismatchException, AmbiguousNameException {
    // Identify the RuntimeIterator for the compiled value
    ObjectType retType = TypeUtils.OBJECT_TYPE;
    try {
      RuntimeIterator rit = context.findRuntimeIterator(cv);
      List pathOnItr = cv.getPathOnIterator(rit, context);
      if (pathOnItr != null) {
        String[] path = (String[]) pathOnItr.toArray(new String[pathOnItr.size()]);
        ObjectType[] ot = PathUtils.calculateTypesAlongPath(context, rit.getElementType(), path);
        retType = ot[ot.length - 1];
      }
    } catch (NameNotFoundException ignore) {
      // Unable to determine the type Of attribute.It will default to
      // ObjectType
    }
    return retType;
  }
This function should be used to create a StructType for those queries which have * as
projection attribute (implying null projection attribute) & multiple from clauses
geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSelect.java