presto-spi/src/main/java/io/prestosql/spi/block/RowBlockBuilder.java/RowBlockBuilder/appendStructureInternal
class RowBlockBuilder:    @Override
    public BlockBuilder appendStructureInternal(Block block, int position)
    {
        if (!(block instanceof AbstractRowBlock)) {
            throw new IllegalArgumentException();
        }

        AbstractRowBlock rowBlock = (AbstractRowBlock) block;
        BlockBuilder entryBuilder = this.beginBlockEntry();

        int fieldBlockOffset = rowBlock.getFieldBlockOffset(position);
        for (int i = 0; i < rowBlock.numFields; i++) {
            if (rowBlock.getRawFieldBlocks()[i].isNull(fieldBlockOffset)) {
                entryBuilder.appendNull();
            }
            else {
                rowBlock.getRawFieldBlocks()[i].writePositionTo(fieldBlockOffset, entryBuilder);
            }
        }

        closeEntry();
        return this;
    }