presto-spi/src/main/java/io/prestosql/spi/block/VariableWidthBlockBuilder.java/VariableWidthBlockBuilder/growCapacity
class VariableWidthBlockBuilder:    private void growCapacity()
    {
        int newSize = BlockUtil.calculateNewArraySize(valueIsNull.length);
        valueIsNull = Arrays.copyOf(valueIsNull, newSize);
        offsets = Arrays.copyOf(offsets, newSize + 1);
        updateArraysDataSize();
    }