presto-hive/src/main/java/io/prestosql/plugin/hive/util/SortBuffer.java/SortBuffer/appendPositionTo
class SortBuffer:    public static void appendPositionTo(Page page, int position, PageBuilder pageBuilder)
    {
        pageBuilder.declarePosition();
        for (int i = 0; i < page.getChannelCount(); i++) {
            Type type = pageBuilder.getType(i);
            Block block = page.getBlock(i);
            BlockBuilder blockBuilder = pageBuilder.getBlockBuilder(i);
            type.appendTo(block, position, blockBuilder);
        }
    }