class Max extends AbstractAggregator implements Aggregator {

    @Override
    public void accept(DataSetRow row, AggregationResult result) {
        final String maxKey = row.get(groupBy);

        // skip value not found
        if (StringUtils.isEmpty(maxKey)) {
            return;
        }

        // get the value
        double value;
        try {
            value = Double.parseDouble(row.get(columnId));
        } catch (NumberFormatException e) {
            // skip non number
            return;
        }

        // init the group by in the result
        if (!result.contains(maxKey)) {
            result.put(maxKey, new NumberContext(value));
        }

        NumberContext context = (NumberContext) result.get(maxKey);

        if (value > context.getValue()) {
            context.setValue(value);
        }
    }

      Max(String groupBy, String columnId);

}