@Override protected Result map(Result result, ResultSetSchema schema) { if (columnName == null) { throw new IllegalStateException("Cannot map results without a column name"); } MetricColumn metricColumn = schema.getColumn(columnName, MetricColumn.class).orElseThrow( () -> new IllegalStateException("Unexpected missing column: " + columnName) ); BigDecimal value = result.getMetricValueAsNumber(metricColumn); if (value == null) { return result; } BigDecimal newValue = value.setScale(0, RoundingMode.CEILING); return result.withMetricValue(metricColumn, newValue); }