public JoinFunction(String[] filterQueries){
  if (filterQueries == null || filterQueries.length == 0) {
    involvedFields=new String[]{ChronixQueryParams.DEFAULT_JOIN_FIELD};
  }
 else {
    for (    String filterQuery : filterQueries) {
      if (filterQuery.startsWith(ChronixQueryParams.JOIN_PARAM)) {
        involvedFields=fields(filterQuery);
        break;
      }
    }
  }
  if (involvedFields == null) {
    involvedFields=new String[]{ChronixQueryParams.DEFAULT_JOIN_FIELD};
  }
}

public JoinFunction ( String [ ] filterQueries ) { if ( filterQueries == null || filterQueries . length == 0 ) { involvedFields = new String [ ] { ChronixQueryParams . DEFAULT_JOIN_FIELD } ; } else { for ( String filterQuery : filterQueries ) { if ( filterQuery . startsWith ( ChronixQueryParams . JOIN_PARAM ) ) { involvedFields = fields ( filterQuery ) ; break ; } } } if ( involvedFields == null ) { involvedFields = new String [ ] { ChronixQueryParams . DEFAULT_JOIN_FIELD } ; } }
the method checks if the filter queries contains a join filter query ( join = field1 , field2 , field3 ) . if not , it returns a function with a default join key that uses the metric field . otherwise it uses the defined fields to build a join key field1 - field2 - field - 3 .
