public final class PrimitiveObjectInspectorUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PrimitiveObjectInspectorUtils.PrimitiveGrouping
Provide a general grouping for each primitive data type.
|
static class |
PrimitiveObjectInspectorUtils.PrimitiveTypeEntry
TypeEntry stores information about a Hive Primitive TypeInfo.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
comparePrimitiveObjects(Object o1,
PrimitiveObjectInspector oi1,
Object o2,
PrimitiveObjectInspector oi2)
Compare 2 primitive objects.
|
static boolean |
comparePrimitiveObjectsWithConversion(Object o1,
PrimitiveObjectInspector oi1,
Object o2,
PrimitiveObjectInspector oi2)
Compare 2 Primitive Objects with their Object Inspector, conversions
allowed.
|
static double |
convertPrimitiveToDouble(Object o,
PrimitiveObjectInspector oi)
Convert a primitive object to double.
|
static org.apache.hadoop.io.BytesWritable |
getBinary(Object o,
PrimitiveObjectInspector oi) |
static org.apache.hadoop.io.BytesWritable |
getBinaryFromText(org.apache.hadoop.io.Text text) |
static boolean |
getBoolean(Object o,
PrimitiveObjectInspector oi)
Get the boolean value out of a primitive object.
|
static byte |
getByte(Object o,
PrimitiveObjectInspector oi)
Get the byte value out of a primitive object.
|
static Date |
getDate(Object o,
PrimitiveObjectInspector oi) |
static double |
getDouble(Object o,
PrimitiveObjectInspector oi)
Get the double value out of a primitive object.
|
static float |
getFloat(Object o,
PrimitiveObjectInspector oi)
Get the float value out of a primitive object.
|
static HiveChar |
getHiveChar(Object o,
PrimitiveObjectInspector oi) |
static HiveDecimal |
getHiveDecimal(Object o,
PrimitiveObjectInspector oi) |
static HiveIntervalDayTime |
getHiveIntervalDayTime(Object o,
PrimitiveObjectInspector oi) |
static HiveIntervalYearMonth |
getHiveIntervalYearMonth(Object o,
PrimitiveObjectInspector oi) |
static HiveVarchar |
getHiveVarchar(Object o,
PrimitiveObjectInspector oi) |
static int |
getInt(Object o,
PrimitiveObjectInspector oi)
Get the integer value out of a primitive object.
|
static Class<?> |
getJavaPrimitiveClassFromObjectInspector(ObjectInspector oi) |
static long |
getLong(Object o,
PrimitiveObjectInspector oi)
Get the long value out of a primitive object.
|
static PrimitiveObjectInspectorUtils.PrimitiveGrouping |
getPrimitiveGrouping(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
Based on the PrimitiveCategory of a type, return the PrimitiveGrouping
that the PrimitiveCategory belongs to (numeric, string, date, etc).
|
static short |
getShort(Object o,
PrimitiveObjectInspector oi)
Get the short value out of a primitive object.
|
static String |
getString(Object o,
PrimitiveObjectInspector oi)
Get the String value out of a primitive object.
|
static Timestamp |
getTimestamp(Object o,
PrimitiveObjectInspector oi) |
static Timestamp |
getTimestamp(Object o,
PrimitiveObjectInspector inputOI,
boolean intToTimestampInSeconds) |
static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry |
getTypeEntryFromPrimitiveCategory(PrimitiveObjectInspector.PrimitiveCategory category)
Get the typeName from a Java Primitive Type or Java PrimitiveClass.
|
static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry |
getTypeEntryFromPrimitiveJava(Class<?> clazz)
Get the TypeEntry for a Java Primitive Type or Java PrimitiveClass.
|
static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry |
getTypeEntryFromPrimitiveJavaClass(Class<?> clazz)
Get the TypeEntry for a Java Primitive Type or Java PrimitiveClass.
|
static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry |
getTypeEntryFromPrimitiveJavaType(Class<?> clazz)
Get the TypeEntry for a Java Primitive Type or Java PrimitiveClass.
|
static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry |
getTypeEntryFromPrimitiveWritableClass(Class<?> clazz)
Get the TypeEntry for a Primitive Writable Class.
|
static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry |
getTypeEntryFromTypeName(String typeName)
Get the TypeEntry for the given base type name (int, varchar, etc).
|
static String |
getTypeNameFromPrimitiveJava(Class<?> clazz)
Get the typeName from a Java Primitive Type or Java PrimitiveClass.
|
static String |
getTypeNameFromPrimitiveWritable(Class<?> clazz)
Get the typeName from a Primitive Writable Class.
|
static boolean |
isPrimitiveJava(Class<?> clazz)
Whether the class is a Java Primitive type or a Java Primitive class.
|
static boolean |
isPrimitiveJavaClass(Class<?> clazz)
Whether the class is a Java Primitive class.
|
static boolean |
isPrimitiveJavaType(Class<?> clazz)
Whether the class is a Java Primitive type.
|
static boolean |
isPrimitiveWritableClass(Class<?> clazz)
Whether the class is a Hive Primitive Writable class.
|
static Class<?> |
primitiveJavaTypeToClass(Class<?> clazz)
Return Whether the class is a Java Primitive type or a Java Primitive
class.
|
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry binaryTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry stringTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry booleanTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry intTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry longTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry floatTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry voidTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry doubleTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry byteTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry shortTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry dateTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry timestampTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry intervalYearMonthTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry intervalDayTimeTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry decimalTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry varcharTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry charTypeEntry
public static final PrimitiveObjectInspectorUtils.PrimitiveTypeEntry unknownTypeEntry
public static Class<?> primitiveJavaTypeToClass(Class<?> clazz)
public static boolean isPrimitiveJava(Class<?> clazz)
public static boolean isPrimitiveJavaType(Class<?> clazz)
public static boolean isPrimitiveJavaClass(Class<?> clazz)
public static boolean isPrimitiveWritableClass(Class<?> clazz)
public static String getTypeNameFromPrimitiveJava(Class<?> clazz)
public static String getTypeNameFromPrimitiveWritable(Class<?> clazz)
public static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry getTypeEntryFromPrimitiveCategory(PrimitiveObjectInspector.PrimitiveCategory category)
public static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry getTypeEntryFromPrimitiveJava(Class<?> clazz)
public static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry getTypeEntryFromPrimitiveJavaType(Class<?> clazz)
public static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry getTypeEntryFromPrimitiveJavaClass(Class<?> clazz)
public static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry getTypeEntryFromPrimitiveWritableClass(Class<?> clazz)
public static PrimitiveObjectInspectorUtils.PrimitiveTypeEntry getTypeEntryFromTypeName(String typeName)
public static boolean comparePrimitiveObjects(Object o1, PrimitiveObjectInspector oi1, Object o2, PrimitiveObjectInspector oi2)
public static double convertPrimitiveToDouble(Object o, PrimitiveObjectInspector oi)
public static boolean comparePrimitiveObjectsWithConversion(Object o1, PrimitiveObjectInspector oi1, Object o2, PrimitiveObjectInspector oi2)
public static boolean getBoolean(Object o, PrimitiveObjectInspector oi)
public static byte getByte(Object o, PrimitiveObjectInspector oi)
public static short getShort(Object o, PrimitiveObjectInspector oi)
public static int getInt(Object o, PrimitiveObjectInspector oi)
public static long getLong(Object o, PrimitiveObjectInspector oi)
public static double getDouble(Object o, PrimitiveObjectInspector oi)
public static float getFloat(Object o, PrimitiveObjectInspector oi)
public static String getString(Object o, PrimitiveObjectInspector oi)
public static HiveChar getHiveChar(Object o, PrimitiveObjectInspector oi)
public static HiveVarchar getHiveVarchar(Object o, PrimitiveObjectInspector oi)
public static org.apache.hadoop.io.BytesWritable getBinaryFromText(org.apache.hadoop.io.Text text)
public static org.apache.hadoop.io.BytesWritable getBinary(Object o, PrimitiveObjectInspector oi)
public static HiveDecimal getHiveDecimal(Object o, PrimitiveObjectInspector oi)
public static Date getDate(Object o, PrimitiveObjectInspector oi)
public static Timestamp getTimestamp(Object o, PrimitiveObjectInspector oi)
public static Timestamp getTimestamp(Object o, PrimitiveObjectInspector inputOI, boolean intToTimestampInSeconds)
public static HiveIntervalYearMonth getHiveIntervalYearMonth(Object o, PrimitiveObjectInspector oi)
public static HiveIntervalDayTime getHiveIntervalDayTime(Object o, PrimitiveObjectInspector oi)
public static Class<?> getJavaPrimitiveClassFromObjectInspector(ObjectInspector oi)
public static PrimitiveObjectInspectorUtils.PrimitiveGrouping getPrimitiveGrouping(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
primitiveCategory
- Primitive category of the typeCopyright © 2017 The Apache Software Foundation. All rights reserved.