public class StandardStructObjectInspector extends SettableStructObjectInspector
Modifier and Type | Class and Description |
---|---|
protected static class |
StandardStructObjectInspector.MyField |
ObjectInspector.Category
Modifier and Type | Field and Description |
---|---|
protected List<StandardStructObjectInspector.MyField> |
fields |
static org.apache.commons.logging.Log |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
StandardStructObjectInspector() |
protected |
StandardStructObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors)
Call ObjectInspectorFactory.getStandardListObjectInspector instead.
|
protected |
StandardStructObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
List<String> structFieldComments)
Call ObjectInspectorFactory.getStandardListObjectInspector instead.
|
protected |
StandardStructObjectInspector(List<StructField> fields) |
Modifier and Type | Method and Description |
---|---|
Object |
create()
Create a struct which is not null, but all its fields are null.
|
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,
List<String> structFieldComments) |
protected void |
init(List<StructField> fields) |
Object |
setStructFieldData(Object struct,
StructField field,
Object fieldValue)
Modify the value of a field.
|
isSettable
toString
public static final org.apache.commons.logging.Log LOG
protected List<StandardStructObjectInspector.MyField> fields
protected StandardStructObjectInspector()
protected StandardStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors)
protected StandardStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments)
protected StandardStructObjectInspector(List<StructField> fields)
protected void init(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments)
protected void init(List<StructField> fields)
public String getTypeName()
ObjectInspector
public final ObjectInspector.Category getCategory()
ObjectInspector
public StructField getStructFieldRef(String fieldName)
StructObjectInspector
getStructFieldRef
in class StructObjectInspector
public List<? extends StructField> getAllStructFieldRefs()
StructObjectInspector
getAllStructFieldRefs
in class StructObjectInspector
public Object getStructFieldData(Object data, StructField fieldRef)
StructObjectInspector
getStructFieldData
in class StructObjectInspector
public List<Object> getStructFieldsDataAsList(Object data)
StructObjectInspector
getStructFieldsDataAsList
in class StructObjectInspector
public Object create()
SettableStructObjectInspector
create
in class SettableStructObjectInspector
public Object setStructFieldData(Object struct, StructField field, Object fieldValue)
SettableStructObjectInspector
setStructFieldData
in class SettableStructObjectInspector
Copyright © 2017 The Apache Software Foundation. All rights reserved.