org.apache.hadoop.hive.serde2.typeinfo
Class TypeInfo

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.typeinfo.TypeInfo
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ListTypeInfo, MapTypeInfo, PrimitiveTypeInfo, StructTypeInfo

public abstract class TypeInfo
extends Object
implements Serializable

Stores information about a type (DDL). Always use the TypeInfoFactory to create new TypeInfo objects. We support 4 categories of types: 1. Primitive objects (String, Number, etc) 2. List objects (a list of objects of a single type) 3. Map objects (a map from objects of one type to objects of another type) 4. Struct objects (a list of fields with names and their own types)

See Also:
Serialized Form

Constructor Summary
protected TypeInfo()
           
 
Method Summary
 List<String> getAllStructFieldNames()
           
 List<TypeInfo> getAllStructFieldTypeInfos()
           
 ObjectInspector.Category getCategory()
           
 TypeInfo getListElementTypeInfo()
           
 TypeInfo getMapKeyTypeInfo()
           
 TypeInfo getMapValueTypeInfo()
           
 Class<?> getPrimitiveClass()
           
 TypeInfo getStructFieldTypeInfo(String field)
           
 String getTypeName()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeInfo

protected TypeInfo()
Method Detail

getTypeName

public String getTypeName()

getCategory

public ObjectInspector.Category getCategory()

getPrimitiveClass

public Class<?> getPrimitiveClass()

getListElementTypeInfo

public TypeInfo getListElementTypeInfo()

getMapKeyTypeInfo

public TypeInfo getMapKeyTypeInfo()

getMapValueTypeInfo

public TypeInfo getMapValueTypeInfo()

getAllStructFieldNames

public List<String> getAllStructFieldNames()

getAllStructFieldTypeInfos

public List<TypeInfo> getAllStructFieldTypeInfos()

getStructFieldTypeInfo

public TypeInfo getStructFieldTypeInfo(String field)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 The Apache Software Foundation