presto-main/src/main/java/io/prestosql/sql/planner/plan/AggregationNode.java/AggregationNode/hasOrderings
class AggregationNode:    public boolean hasOrderings()
    {
        return aggregations.values().stream()
                .map(Aggregation::getOrderingScheme)
                .anyMatch(Optional::isPresent);
    }