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