public class SubStructObjectInspector extends StructObjectInspector
ObjectInspector.Category
Modifier and Type | Field and Description |
---|---|
protected StructObjectInspector |
baseOI |
protected List<StructField> |
fields |
protected int |
numCols |
protected int |
startCol |
Constructor and Description |
---|
SubStructObjectInspector(StructObjectInspector baseOI,
int startCol,
int numCols)
Create a new Object Inspector based on a base object inspector and the subset of
columns will be inspected (from startCol to startCol+numCols).
|
Modifier and Type | Method and Description |
---|---|
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.
|
isSettable, toString
protected StructObjectInspector baseOI
protected int startCol
protected int numCols
protected List<StructField> fields
public SubStructObjectInspector(StructObjectInspector baseOI, int startCol, int numCols)
baseOI
- startCol
- numCols
- public String getTypeName()
ObjectInspector
public ObjectInspector.Category getCategory()
ObjectInspector
public List<? extends StructField> getAllStructFieldRefs()
StructObjectInspector
getAllStructFieldRefs
in class StructObjectInspector
public StructField getStructFieldRef(String fieldName)
StructObjectInspector
getStructFieldRef
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
Copyright © 2017 The Apache Software Foundation. All rights reserved.