Search in sources :

Example 1 with GenericUDAFMin

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

the class TestStreamingMin method minLong.

public void minLong(Iterator<Long> inVals, int inSz, int numPreceding, int numFollowing, Iterator<Long> outVals) throws HiveException {
    GenericUDAFMin fnR = new GenericUDAFMin();
    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) GenericUDAFMin(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMin) LongWritable(org.apache.hadoop.io.LongWritable) TypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)

Aggregations

GenericUDAFMin (org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMin)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