code: public static List<Map<String, Object>> readSelectClause(Expression selectExpression, EntityMetadata m,
              Boolean useLuceneOrES, KunderaMetadata kunderaMetadata)
      {
          List<Map<String, Object>> columnsToOutput = new ArrayList<Map<String, Object>>();
          if (StateFieldPathExpression.class.isAssignableFrom(selectExpression.getClass()))
          {
              Expression sfpExp = selectExpression;
  
              addToOutputColumns(selectExpression, m, columnsToOutput, kunderaMetadata);
          }
          else if (CollectionExpression.class.isAssignableFrom(selectExpression.getClass()))
          {
              CollectionExpression collExp = (CollectionExpression) selectExpression;
              ListIterator<Expression> itr = collExp.children().iterator();
              while (itr.hasNext())
              {
                  Expression exp = itr.next();
                  if (StateFieldPathExpression.class.isAssignableFrom(exp.getClass()))
                  {
                      addToOutputColumns(exp, m, columnsToOutput, kunderaMetadata);
                  }
              }
          }
          return columnsToOutput;
      }
docs: Read select clause.
  
  @param selectExpression
  the select expression
  @param m
  the m
  @param useLuceneOrES
  the use lucene or es
  @param kunderaMetadata
  @return the list