@Override
    public ColumnStatistics buildColumnStatistics()
    {
        Optional<BinaryStatistics> binaryStatistics = buildBinaryStatistics();
        if (binaryStatistics.isPresent()) {
            verify(nonNullValueCount > 0);
            return new BinaryColumnStatistics(nonNullValueCount, null, rawSize, storageSize, binaryStatistics.get());
        }
        return new ColumnStatistics(nonNullValueCount, null, rawSize, storageSize);
    }
@Test
    public void testBlockBinaryStatistics()
    {
        String alphabets = "abcdefghijklmnopqrstuvwxyz";
        VariableWidthBlockBuilder blockBuilder = new VariableWidthBlockBuilder(null, alphabets.length(), alphabets.length());
        Slice slice = utf8Slice(alphabets);
        for (int i = 0; i < slice.length(); i++) {
            VARBINARY.writeSlice(blockBuilder, slice, i, 1);
        }
        blockBuilder.appendNull();

        BinaryStatisticsBuilder binaryStatisticsBuilder = new BinaryStatisticsBuilder();
        binaryStatisticsBuilder.addBlock(VARBINARY, blockBuilder);

        BinaryStatistics binaryStatistics = binaryStatisticsBuilder.buildColumnStatistics().getBinaryStatistics();
        assertEquals(binaryStatistics.getSum(), slice.length());
    }