presto-main/src/main/java/io/prestosql/sql/planner/optimizations/UnaliasSymbolReferences.java/Rewriter/visitLimit
class Rewriter:        @Override
        public PlanNode visitLimit(LimitNode node, RewriteContext<Void> context)
        {
            if (node.isWithTies()) {
                PlanNode source = context.rewrite(node.getSource());
                return new LimitNode(node.getId(), source, node.getCount(), node.getTiesResolvingScheme().map(this::canonicalizeAndDistinct), node.isPartial());
            }
            return context.defaultRewrite(node);
        }