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

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.typeinfo.TypeInfo
      extended by org.apache.hadoop.hive.serde2.typeinfo.UnionTypeInfo
All Implemented Interfaces:
Serializable

public class UnionTypeInfo
extends TypeInfo
implements Serializable

UnionTypeInfo represents the TypeInfo of an union. A union holds only one field of the specified fields at any point of time. The fields, a Union can hold, can have the same or different TypeInfo. Always use the TypeInfoFactory to create new TypeInfo objects, instead of directly creating an instance of this class.

See Also:
Serialized Form

Constructor Summary
UnionTypeInfo()
          For java serialization use only.
 
Method Summary
 boolean equals(Object other)
           
 List<TypeInfo> getAllUnionObjectTypeInfos()
           
 ObjectInspector.Category getCategory()
          The Category of this TypeInfo.
 String getTypeName()
          A String representation of the TypeInfo.
 int hashCode()
           
 void setAllUnionObjectTypeInfos(List<TypeInfo> allUnionObjectTypeInfos)
          For java serialization use only.
 
Methods inherited from class org.apache.hadoop.hive.serde2.typeinfo.TypeInfo
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnionTypeInfo

public UnionTypeInfo()
For java serialization use only.

Method Detail

getTypeName

public String getTypeName()
Description copied from class: TypeInfo
A String representation of the TypeInfo.

Specified by:
getTypeName in class TypeInfo

setAllUnionObjectTypeInfos

public void setAllUnionObjectTypeInfos(List<TypeInfo> allUnionObjectTypeInfos)
For java serialization use only.


getCategory

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

Specified by:
getCategory in class TypeInfo

getAllUnionObjectTypeInfos

public List<TypeInfo> getAllUnionObjectTypeInfos()

equals

public boolean equals(Object other)
Specified by:
equals in class TypeInfo

hashCode

public int hashCode()
Specified by:
hashCode in class TypeInfo


Copyright © 2011 The Apache Software Foundation