Aggregation queries with no group-by clause (for example, select count from src) executes final aggregation in single reduce task. But it's too small even for single reducer because the most of UDAF generates just single row for map aggregation. If final fetch task can aggregate outputs from map tasks, shuffling time can be removed.
This optimization transforms operator tree something like,
TS-FIL-SEL-GBY1-RS-GBY2-SEL-FS + FETCH-TASK
TS-FIL-SEL-GBY1-FS + FETCH-TASK(GBY2-SEL-LS)
With the patch, time taken for auto_join_filters.q test reduced to 6 min (10 min, before).