Fix for making ReduceAggregatesRule work with  Drill.