private List<Object> executeGroupBy(ProfileMeasurement m){
  List<Object> groups=new ArrayList<>();
  if (!isEmpty(m.getGroupBy())) {
    try {
      BeanMap measureAsMap=new BeanMap(m);
      for (      String expr : m.getGroupBy()) {
        Object result=executor.execute(expr,measureAsMap,Object.class);
        groups.add(result);
      }
    }
 catch (    Throwable e) {
      String msg=format("Bad 'groupBy' expression: %s, profile=%s, entity=%s",e.getMessage(),m.getProfileName(),m.getEntity());
      throw new ParseException(msg,e);
    }
  }
  return groups;
}

private List < Object > executeGroupBy ( ProfileMeasurement m ) { List < Object > groups = new ArrayList < > ( ) ; if ( ! isEmpty ( m . getGroupBy ( ) ) ) { try { BeanMap measureAsMap = new BeanMap ( m ) ; for ( String expr : m . getGroupBy ( ) ) { Object result = executor . execute ( expr , measureAsMap , Object . class ) ; groups . add ( result ) ; } } catch ( Throwable e ) { String msg = format ( "Bad 'groupBy' expression: %s, profile=%s, entity=%s" , e . getMessage ( ) , m . getProfileName ( ) , m . getEntity ( ) ) ; throw new ParseException ( msg , e ) ; } } return groups ; }
executes each of the ' groupby ' expressions . the result of each expression are the groups used to sort the data as part of the row key .
