GenericUDAFParameterInfo paramInfo2 = new SimpleGenericUDAFParameterInfo(inputOiList2, false, false);
GenericUDAFEvaluator udafEvaluator2 = udaf.getEvaluator(paramInfo2);
Mode m1 = Mode.PARTIAL1;
ObjectInspector partialOutputOi1 = udafEvaluator1.init(m1, inputOiList1);
AggregationBuffer agg1 = udafEvaluator1.getNewAggregationBuffer();
udafEvaluator1.reset(agg1);
udafEvaluator1.iterate(agg1, new Object[] { null , 12 });
Object res1 = udafEvaluator1.terminate(agg1);
Mode m2 = Mode.PARTIAL1;
ObjectInspector partialOutputOi2 = udafEvaluator2.init(m2, inputOiList2);
AggregationBuffer agg2 = udafEvaluator2.getNewAggregationBuffer();
udafEvaluator2.reset(agg2);
udafEvaluator2.iterate(agg2, new Object[] { null , 12 });
Object res2 = udafEvaluator2.terminate(agg2);
ObjectInspector finalOutputOi = udafEvaluator2.init(Mode.FINAL, new ObjectInspector[] {partialOutputOi1});
AggregationBuffer agg3 = udafEvaluator2.getNewAggregationBuffer();
udafEvaluator2.merge(agg3, agg1);
udafEvaluator2.merge(agg3, agg2);
Object result = udafEvaluator2.terminate(agg3);