presto-accumulo/src/main/java/io/prestosql/plugin/accumulo/index/ColumnCardinalityCache.java/CardinalityCacheLoader/load
class CardinalityCacheLoader:        @Override
        public Long load(CacheKey key)
                throws Exception
        {
            LOG.debug("Loading a non-exact range from Accumulo: %s", key);
            // Get metrics table name and the column family for the scanner
            String metricsTable = getMetricsTableName(key.getSchema(), key.getTable());
            Text columnFamily = new Text(getIndexColumnFamily(key.getFamily().getBytes(UTF_8), key.getQualifier().getBytes(UTF_8)).array());

            // Create scanner for querying the range
            BatchScanner scanner = connector.createBatchScanner(metricsTable, key.auths, 10);
            scanner.setRanges(connector.tableOperations().splitRangeByTablets(metricsTable, key.range, Integer.MAX_VALUE));
            scanner.fetchColumn(columnFamily, CARDINALITY_CQ_AS_TEXT);

            try {
                return stream(scanner)
                        .map(Entry::getValue)
                        .map(Value::toString)
                        .mapToLong(Long::parseLong)
                        .sum();
            }
            finally {
                scanner.close();
            }
        }