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

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory

public class TypeInfoFactory
extends Object

TypeInfoFactory can be used to create the TypeInfo object for any types. TypeInfo objects are all read-only so we can reuse them easily. TypeInfoFactory has internal cache to make sure we don't create 2 TypeInfo objects that represents the same type.


Constructor Summary
TypeInfoFactory()
           
 
Method Summary
static TypeInfo getListTypeInfo(TypeInfo elementTypeInfo)
           
static TypeInfo getMapTypeInfo(TypeInfo keyTypeInfo, TypeInfo valueTypeInfo)
           
static TypeInfo getPrimitiveTypeInfo(Class<?> primitiveClass)
           
static TypeInfo getStructTypeInfo(List<String> names, List<TypeInfo> typeInfos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeInfoFactory

public TypeInfoFactory()
Method Detail

getPrimitiveTypeInfo

public static TypeInfo getPrimitiveTypeInfo(Class<?> primitiveClass)

getStructTypeInfo

public static TypeInfo getStructTypeInfo(List<String> names,
                                         List<TypeInfo> typeInfos)

getListTypeInfo

public static TypeInfo getListTypeInfo(TypeInfo elementTypeInfo)

getMapTypeInfo

public static TypeInfo getMapTypeInfo(TypeInfo keyTypeInfo,
                                      TypeInfo valueTypeInfo)


Copyright © 2009 The Apache Software Foundation