private AggregationCondition.Type translateAggregationType(
            String aggregationStr) throws AggregationTypeInvalidException {
        if (aggregationStr.toLowerCase().equals("avg")) {
            return AggregationCondition.Type.average;
        } else if (aggregationStr.toLowerCase().equals("sum")) {
            return AggregationCondition.Type.sum;
        } else if (aggregationStr.toLowerCase().equals("max")) {
            return AggregationCondition.Type.max;
        } else if (aggregationStr.toLowerCase().equals("min")) {
            return AggregationCondition.Type.min;
        } else {
            throw new AggregationTypeInvalidException();
        }
    }