presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/CreatePartialTopN.java/CreatePartialTopN/apply
class CreatePartialTopN:    @Override
    public Result apply(TopNNode single, Captures captures, Context context)
    {
        TopNNode partial = new TopNNode(
                context.getIdAllocator().getNextId(),
                single.getSource(),
                single.getCount(),
                single.getOrderingScheme(),
                PARTIAL);

        return Result.ofPlanNode(new TopNNode(
                context.getIdAllocator().getNextId(),
                partial,
                single.getCount(),
                single.getOrderingScheme(),
                FINAL));
    }