private ValueExtractor buildPrecisionMsExtractor(final int idx) {
        final ValueExtractor extractor;
        extractor = (rs, arr, cache) -> {
            // the precision in the table represents the number of zeros
            // of millisecond precision, e.g.
            // 6=1,000,000ms
            final long precisionMs;
            try {
                precisionMs = (long) Math.pow(10, rs.getInt(SQLStatisticNames.PRECISION));
            } catch (SQLException e) {
                throw new RuntimeException("Error extracting precision field", e);
            }
            arr[idx] = ValDuration.create(precisionMs);
        };
        return extractor;
    }
Build a mapper function that will only extract the columns of interest from the resultSet row.
Assumes something external to the returned function will advance the resultSet
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/search/StatisticsSearchServiceImpl.java