presto-main/src/main/java/io/prestosql/sql/planner/optimizations/PlanNodeDecorrelator.java/PlanNodeDecorrelator/decorrelateOrderingScheme
class PlanNodeDecorrelator:        private Optional<OrderingScheme> decorrelateOrderingScheme(OrderingScheme orderingScheme, Set<Symbol> constantSymbols)
        {
            // remove local and remote constant sort symbols from the OrderingScheme
            ImmutableList.Builder<Symbol> nonConstantOrderBy = ImmutableList.builder();
            ImmutableMap.Builder<Symbol, SortOrder> nonConstantOrderings = ImmutableMap.builder();
            for (Symbol symbol : orderingScheme.getOrderBy()) {
                if (!constantSymbols.contains(symbol) && !correlation.contains(symbol)) {
                    nonConstantOrderBy.add(symbol);
                    nonConstantOrderings.put(symbol, orderingScheme.getOrdering(symbol));
                }
            }
            if (nonConstantOrderBy.build().isEmpty()) {
                return Optional.empty();
            }
            return Optional.of(new OrderingScheme(nonConstantOrderBy.build(), nonConstantOrderings.build()));
        }