presto-main/src/main/java/io/prestosql/sql/planner/QueryPlanner.java/QueryPlanner/sort
class QueryPlanner:    private PlanBuilder sort(PlanBuilder subPlan, Optional<OrderingScheme> orderingScheme)
    {
        if (!orderingScheme.isPresent()) {
            return subPlan;
        }

        return subPlan.withNewRoot(
                new SortNode(
                        idAllocator.getNextId(),
                        subPlan.getRoot(),
                        orderingScheme.get(),
                        false));
    }