presto-spi/src/main/java/io/prestosql/spi/block/ByteArrayBlockBuilder.java/ByteArrayBlockBuilder/build
class ByteArrayBlockBuilder:    @Override
    public Block build()
    {
        if (!hasNonNullValue) {
            return new RunLengthEncodedBlock(NULL_VALUE_BLOCK, positionCount);
        }
        return new ByteArrayBlock(0, positionCount, hasNullValue ? valueIsNull : null, values);
    }