Eng 6436 distinct reroute

This is the fast, simple but not the best efficient solution for DISTINCT with GROUP BY cases. We will create tickets to optimize it later.
I'm pretty sure that m_noAggregation could just be replaced with (m_aggTypes.size() == 0).

Anyway, once you establish that there are no aggs, you don't need a loop to tell you that there are no distinct aggs.

In general, except for possibly some future edge case optimizations involving parent aggs of SELECT DISTINCT subqueries, SELECT DISTINCT has NOTHING to do with AGG(DISTINCT) -- it just happens to use the same keyword to mean two completely separate things.