Package org.apache.hadoop.hive.ql.udf.generic

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage


public class TestStreamingAvg {

  public void avgDouble(Iterator<Double> inVals, int inSz, int numPreceding,
      int numFollowing, Iterator<Double> outVals) throws HiveException {

    GenericUDAFAverage fnR = new GenericUDAFAverage();
    TypeInfo[] inputTypes = { TypeInfoFactory.doubleTypeInfo };
    ObjectInspector[] inputOIs = { PrimitiveObjectInspectorFactory.writableDoubleObjectInspector };

    DoubleWritable[] in = new DoubleWritable[1];
    in[0] = new DoubleWritable();
View Full Code Here


  public void avgHiveDecimal(Iterator<HiveDecimal> inVals, int inSz,
      int numPreceding, int numFollowing, Iterator<HiveDecimal> outVals)
      throws HiveException {

    GenericUDAFAverage fnR = new GenericUDAFAverage();
    TypeInfo[] inputTypes = { TypeInfoFactory.decimalTypeInfo };
    ObjectInspector[] inputOIs = { PrimitiveObjectInspectorFactory.writableHiveDecimalObjectInspector };

    HiveDecimalWritable[] in = new HiveDecimalWritable[1];
    in[0] = new HiveDecimalWritable();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.