presto-main/src/main/java/io/prestosql/sql/planner/optimizations/LimitPushDown.java/Rewriter/visitMarkDistinct
class Rewriter:        @Override
        public PlanNode visitMarkDistinct(MarkDistinctNode node, RewriteContext<LimitContext> context)
        {
            // the fallback logic (in visitPlan) for node types we don't know about introduces a limit node,
            // so we need this here to push the limit through this trivial node type
            return context.defaultRewrite(node, context.get());
        }