presto-main/src/main/java/io/prestosql/operator/TopNProcessor.java/TopNProcessor/addInput
class TopNProcessor:    public void addInput(Page page)
    {
        requireNonNull(topNBuilder, "topNBuilder is null");
        boolean done = topNBuilder.processPage(requireNonNull(page, "page is null")).process();
        // there is no grouping so work will always be done
        verify(done);
        updateMemoryReservation();
    }