Reported by Rahul Challapalli
Based on the memory computations drill thinks that there is not sufficient memory and falls back to a single partition case. The single partition case however does not respect the memory constraints imposed and completes the query using ~130MB of memory
Based on analysis by Boaz Ben-Zvi this is by design. When the Hash Aggr Op finds that there is not enough memory for at least two partitions, it falls back to the pre 1.11 behavior ( using 10GB limit ).
Solution is to provide a configuration based on which the fallback will be either allowed or query will be failed.