presto-spi/src/main/java/io/prestosql/spi/block/SingleRowBlockWriter.java/SingleRowBlockWriter/getPositionCount
class SingleRowBlockWriter:    @Override
    public int getPositionCount()
    {
        if (fieldBlockBuilderReturned) {
            throw new IllegalStateException("field block builder has been returned");
        }
        return positionsWritten;
    }