code: private static <E extends Entity> boolean isDistinctSelectRequired(
        EntityType entityType, Query<E> q) {
      return isDistinctSelectRequiredRec(entityType, q.getRules());
    }
docs: Determines whether a distinct select is required based on a given query.
  
  @param entityType entity meta data
  @param q query
  @param <E> entity type
  @return <code>true</code> if a distinct select is required for SQL queries based on the given
  query
  @throws UnknownAttributeException if query field refers to an attribute that does not exist in
  entity meta