presto-main/src/main/java/io/prestosql/operator/DistinctLimitOperator.java/DistinctLimitOperator/needsInput
class DistinctLimitOperator:    @Override
    public boolean needsInput()
    {
        return !finishing && remainingLimit > 0 && !hasUnfinishedInput();
    }