|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.objectinspector.LazySimpleStructObjectInspector
public class LazySimpleStructObjectInspector
LazySimpleStructObjectInspector works on struct data that is stored in LazyStruct. The names of the struct fields and the internal structure of the struct fields are specified in the ctor of the LazySimpleStructObjectInspector. Always use the ObjectInspectorFactory to create new ObjectInspector objects, instead of directly creating an instance of this class.
Nested Class Summary | |
---|---|
protected static class |
LazySimpleStructObjectInspector.MyField
|
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
---|
ObjectInspector.Category |
Field Summary | |
---|---|
protected List<LazySimpleStructObjectInspector.MyField> |
fields
|
static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
protected |
LazySimpleStructObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
byte separator,
org.apache.hadoop.io.Text nullSequence,
boolean lastColumnTakesRest)
Call ObjectInspectorFactory.getLazySimpleStructObjectInspector instead. |
protected |
LazySimpleStructObjectInspector(List<StructField> fields,
byte separator,
org.apache.hadoop.io.Text nullSequence)
|
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. |
protected void |
init(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
byte separator,
org.apache.hadoop.io.Text nullSequence,
boolean lastColumnTakesRest)
|
protected void |
init(List<StructField> fields,
byte separator,
org.apache.hadoop.io.Text nullSequence)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
protected List<LazySimpleStructObjectInspector.MyField> fields
Constructor Detail |
---|
protected LazySimpleStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, byte separator, org.apache.hadoop.io.Text nullSequence, boolean lastColumnTakesRest)
protected LazySimpleStructObjectInspector(List<StructField> fields, byte separator, org.apache.hadoop.io.Text nullSequence)
Method Detail |
---|
public String getTypeName()
ObjectInspector
getTypeName
in interface ObjectInspector
protected void init(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, byte separator, org.apache.hadoop.io.Text nullSequence, boolean lastColumnTakesRest)
protected void init(List<StructField> fields, byte separator, org.apache.hadoop.io.Text nullSequence)
public final ObjectInspector.Category getCategory()
ObjectInspector
getCategory
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 |