public class CollectMaxTest {
///@Test
public void testCollectMaxAggBuffer() throws HiveException {
MapCollectMaxUDAFEvaluator maxEval = new MapCollectMaxUDAFEvaluator(true);
WritableStringObjectInspector keyOI = (WritableStringObjectInspector) PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(PrimitiveCategory.STRING);
WritableIntObjectInspector valOI = (WritableIntObjectInspector) PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(PrimitiveCategory.INT);
maxEval.init( Mode.PARTIAL1, new ObjectInspector[] { keyOI, valOI} );
MapAggBuffer buffer = (MapAggBuffer) maxEval.getNewAggregationBuffer();
Text key = new Text();
IntWritable val = new IntWritable();
for(int i=0; i<100; i++) {
key.set(" Key # " + i);