|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils
public final class PrimitiveObjectInspectorUtils
ObjectInspectorFactory is the primary way to create new ObjectInspector instances. SerDe classes should call the static functions in this library to create an ObjectInspector to return to the caller of SerDe2.getObjectInspector().
Nested Class Summary | |
---|---|
static class |
PrimitiveObjectInspectorUtils.PrimitiveTypeEntry
TypeEntry stores information about a Hive Primitive TypeInfo. |
Method Summary | |
---|---|
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 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 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 int |
getInt(Object o,
PrimitiveObjectInspector oi)
Get the integer value out of a primitive object. |
static long |
getLong(Object o,
PrimitiveObjectInspector oi)
Get the long value out of a primitive object. |
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 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 a Primitive Writable Class. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 unknownTypeEntry
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |