presto-spi/src/main/java/io/prestosql/spi/block/VariableWidthBlockBuilder.java/VariableWidthBlockBuilder/newBlockBuilderLike
class VariableWidthBlockBuilder:    @Override
    public BlockBuilder newBlockBuilderLike(BlockBuilderStatus blockBuilderStatus)
    {
        int currentSizeInBytes = positions == 0 ? positions : (getOffset(positions) - getOffset(0));
        return new VariableWidthBlockBuilder(blockBuilderStatus, calculateBlockResetSize(positions), calculateBlockResetBytes(currentSizeInBytes));
    }