presto-main/src/main/java/io/prestosql/operator/window/PercentRankFunction.java/PercentRankFunction/processRow
class PercentRankFunction:    @Override
    public void processRow(BlockBuilder output, boolean newPeerGroup, int peerGroupCount, int currentPosition)
    {
        if (totalCount == 1) {
            DOUBLE.writeDouble(output, 0.0);
            return;
        }

        if (newPeerGroup) {
            rank += count;
            count = 1;
        }
        else {
            count++;
        }

        DOUBLE.writeDouble(output, ((double) (rank - 1)) / (totalCount - 1));
    }