class Sum extends AbstractAggregator implements Aggregator {

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

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

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

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

        NumberContext context = (NumberContext) result.get(sumKey);
        context.setValue(context.getValue() + toAdd);

    }

      Sum(String groupBy, String columnId);

}