presto-main/src/main/java/io/prestosql/operator/MarkDistinctOperator.java/MarkDistinctOperator/isFinished
class MarkDistinctOperator:    @Override
    public boolean isFinished()
    {
        return finishing && !hasUnfinishedInput();
    }