presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/AddIntermediateAggregations.java/AddIntermediateAggregations/isEnabled
class AddIntermediateAggregations:    @Override
    public boolean isEnabled(Session session)
    {
        return SystemSessionProperties.isEnableIntermediateAggregations(session);
    }