presto-main/src/main/java/io/prestosql/operator/project/MergingPageOutput.java/MergingPageOutput/isFinished
class MergingPageOutput:    public boolean isFinished()
    {
        return finishing && currentInput == null && outputQueue.isEmpty() && pageBuilder.isEmpty();
    }