presto-spi/src/main/java/io/prestosql/spi/block/SingleMapBlockWriter.java/SingleMapBlockWriter/appendStructureInternal
class SingleMapBlockWriter:    @Override
    public BlockBuilder appendStructureInternal(Block block, int position)
    {
        if (writeToValueNext) {
            valueBlockBuilder.appendStructureInternal(block, position);
        }
        else {
            keyBlockBuilder.appendStructureInternal(block, position);
        }
        entryAdded();
        return this;
    }