presto-main/src/main/java/io/prestosql/operator/LimitOperator.java/LimitOperator/isFinished
class LimitOperator:    @Override
    public boolean isFinished()
    {
        return remainingLimit == 0 && nextPage == null;
    }