brickhouse.udf.timeseries
Class NumericUtil

java.lang.Object
  extended by brickhouse.udf.timeseries.NumericUtil

public final class NumericUtil
extends Object


Constructor Summary
NumericUtil()
           
 
Method Summary
static Object castToPrimitiveNumeric(double val, org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory cat)
          Cast a double to an object required by the ObjectInspector associated with the given PrimitiveCategory
static double getNumericValue(org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector objInsp, Object val)
          Cast the output of a Numeric ObjectInspector to a double
static boolean isNumericCategory(org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory cat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericUtil

public NumericUtil()
Method Detail

isNumericCategory

public static boolean isNumericCategory(org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory cat)

getNumericValue

public static double getNumericValue(org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector objInsp,
                                     Object val)
Cast the output of a Numeric ObjectInspector to a double

Parameters:
objInsp -
Returns:

castToPrimitiveNumeric

public static Object castToPrimitiveNumeric(double val,
                                            org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory cat)
Cast a double to an object required by the ObjectInspector associated with the given PrimitiveCategory

Parameters:
val -
cat -
Returns:


Copyright © 2013. All rights reserved.