Hook generated aggregation in to the planner.
Fix hive planner