Search in sources :

Example 1 with GenericUDAFMax

use of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax in project hive by apache.

the class TestStreamingMax method maxLong.

public void maxLong(Iterator<Long> inVals, int inSz, int numPreceding, int numFollowing, Iterator<Long> outVals) throws HiveException {
    GenericUDAFMax fnR = new GenericUDAFMax();
    TypeInfo[] inputTypes = { TypeInfoFactory.longTypeInfo };
    ObjectInspector[] inputOIs = { PrimitiveObjectInspectorFactory.writableLongObjectInspector };
    LongWritable[] in = new LongWritable[1];
    in[0] = new LongWritable();
    TestStreamingSum._agg(fnR, inputTypes, inVals, TypeHandler.LongHandler, in, inputOIs, inSz, numPreceding, numFollowing, outVals);
}
Also used : ObjectInspector(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector) GenericUDAFMax(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax) LongWritable(org.apache.hadoop.io.LongWritable) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Aggregations

GenericUDAFMax (org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax)1 ObjectInspector (org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector)1 TypeInfo (org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)1 LongWritable (org.apache.hadoop.io.LongWritable)1