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, UnionTypeInfo

public abstract class TypeInfo
extends Object
implements Serializable

Stores information about a type. Always use the TypeInfoFactory to create new TypeInfo objects. We support 5 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) 5. Union objects

See Also:
Serialized Form

Constructor Summary
protected TypeInfo()
           
 
Method Summary
abstract  boolean equals(Object o)
           
abstract  ObjectInspector.Category getCategory()
          The Category of this TypeInfo.
 String getQualifiedName()
          String representing the qualified type name.
abstract  String getTypeName()
          A String representation of the TypeInfo.
abstract  int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeInfo

protected TypeInfo()
Method Detail

getCategory

public abstract ObjectInspector.Category getCategory()
The Category of this TypeInfo. Possible values are Primitive, List, Map, Struct and Union, which corresponds to the 5 sub-classes of TypeInfo.


getTypeName

public abstract String getTypeName()
A String representation of the TypeInfo.


getQualifiedName

public String getQualifiedName()
String representing the qualified type name. Qualified types should override this method.

Returns:

toString

public String toString()
Overrides:
toString in class Object

equals

public abstract boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public abstract int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012 The Apache Software Foundation