brickhouse.udf.timeseries
Class NumericUtil
java.lang.Object
brickhouse.udf.timeseries.NumericUtil
public final class NumericUtil
- extends Object
|
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 |
NumericUtil
public NumericUtil()
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.