code: private void _buildProjection(
                      final Projection p,
                      final StringBuilder stmt
                      )
      {
          if (p instanceof Aggregation) {
              Aggregation  aggr = (Aggregation)p;
              stmt.append( aggr.getFunction().name() );
              stmt.append( "(" );
              String  expr = aggr.getExpression();
              if (Aggregation.WHOLE_OBJECT_EXPRESSION.equals( expr )) {
                  stmt.append( expr );
              } else {
                  _buildProperty( expr, stmt );
                  //throws SearchException
              }
              stmt.append( ")" );
          } else if (p instanceof PropertyProjection) {
              PropertyProjection  pp = (PropertyProjection)p;
              _buildProperty( pp.getProperty(), stmt );
              //throws SearchException
          } else {
              throw new IllegalArgumentException( "unsupported projection: " + p );
          }
      }
docs: Projection
  COUNT(*)
  MAX(T.a)
  T.a