presto-spi/src/main/java/io/prestosql/spi/block/MapBlockBuilder.java/MapBlockBuilder/beginBlockEntry
class MapBlockBuilder:    @Override
    public SingleMapBlockWriter beginBlockEntry()
    {
        if (currentEntryOpened) {
            throw new IllegalStateException("Expected current entry to be closed but was opened");
        }
        currentEntryOpened = true;
        return new SingleMapBlockWriter(keyBlockBuilder.getPositionCount() * 2, keyBlockBuilder, valueBlockBuilder);
    }