presto-main/src/main/java/io/prestosql/operator/aggregation/GenericAccumulatorFactory.java/GenericAccumulatorFactory/hasOrderBy
class GenericAccumulatorFactory:    @Override
    public boolean hasOrderBy()
    {
        return !orderByChannels.isEmpty();
    }