add support for bagis aggregation(MAX, MIN)