presto-main/src/main/java/io/prestosql/operator/window/RankFunction.java/RankFunction/processRow
class RankFunction:    @Override
    public void processRow(BlockBuilder output, boolean newPeerGroup, int peerGroupCount, int currentPosition)
    {
        if (newPeerGroup) {
            rank += count;
            count = 1;
        }
        else {
            count++;
        }
        BIGINT.writeLong(output, rank);
    }