|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector
public class UnionStructObjectInspector
UnionStructObjectInspector unions several struct data into a single struct. Basically, the fields of these structs are put together sequentially into a single struct. The object that can be acceptable by this ObjectInspector is a List of objects, each of which can be inspected by the ObjectInspector provided in the ctor of UnionStructObjectInspector. Always use the ObjectInspectorFactory to create new ObjectInspector objects, instead of directly creating an instance of this class.
Nested Class Summary | |
---|---|
static class |
UnionStructObjectInspector.MyField
|
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
---|
ObjectInspector.Category |
Constructor Summary | |
---|---|
protected |
UnionStructObjectInspector(List<StructObjectInspector> unionObjectInspectors)
|
Method Summary | |
---|---|
List<? extends StructField> |
getAllStructFieldRefs()
Returns all the fields. |
ObjectInspector.Category |
getCategory()
An ObjectInspector must inherit from one of the following interfaces if getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST: ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector |
Object |
getStructFieldData(Object data,
StructField fieldRef)
returns null for data = null. |
StructField |
getStructFieldRef(String fieldName)
Look up a field. |
List<Object> |
getStructFieldsDataAsList(Object data)
returns null for data = null. |
String |
getTypeName()
Returns the name of the data type that is inspected by this ObjectInspector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected UnionStructObjectInspector(List<StructObjectInspector> unionObjectInspectors)
Method Detail |
---|
public final ObjectInspector.Category getCategory()
ObjectInspector
getCategory
in interface ObjectInspector
public String getTypeName()
ObjectInspector
getTypeName
in interface ObjectInspector
public StructField getStructFieldRef(String fieldName)
StructObjectInspector
getStructFieldRef
in interface StructObjectInspector
public List<? extends StructField> getAllStructFieldRefs()
StructObjectInspector
getAllStructFieldRefs
in interface StructObjectInspector
public Object getStructFieldData(Object data, StructField fieldRef)
StructObjectInspector
getStructFieldData
in interface StructObjectInspector
public List<Object> getStructFieldsDataAsList(Object data)
StructObjectInspector
getStructFieldsDataAsList
in interface StructObjectInspector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |