@Override
    public Object terminate(AggregationBuffer agg) throws HiveException {
      MinAgg myagg = (MinAgg) agg;
      return myagg.o;
    }
class for storing the current max value
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMin.java