Eng 4625: add support for min() and max() on matview