public class LazyStruct extends LazyNonPrimitive<LazySimpleStructObjectInspector> implements StructObject, SerDeStatsStruct
bytes, length, startisNull, oi| Constructor and Description |
|---|
LazyStruct(LazySimpleStructObjectInspector oi)
Construct a LazyStruct object with the ObjectInspector.
|
| Modifier and Type | Method and Description |
|---|---|
protected LazyObjectBase |
createLazyField(int fieldID,
StructField fieldRef) |
byte[] |
getBytes()
Return the data in bytes corresponding to this given struct.
|
Object |
getField(int fieldID)
Get one field out of the struct.
|
protected boolean[] |
getFieldInited() |
protected LazyObjectBase[] |
getFields() |
List<Object> |
getFieldsAsList()
Get the values of the fields as an ArrayList.
|
protected boolean |
getParsed() |
long |
getRawDataSerializedSize()
Rerurns the serialized size of the object.
|
void |
init(ByteArrayRef bytes,
int start,
int length)
Set the row data for this LazyStruct.
|
protected void |
initLazyFields(List<? extends StructField> fieldRefs) |
void |
parseMultiDelimit(byte[] rawRow,
byte[] fieldDelimit) |
protected void |
setFieldInited(boolean[] fieldInited) |
protected void |
setFields(LazyObject[] fields) |
protected void |
setParsed(boolean parsed) |
hashCode, isNull, isNullgetInspector, getObject, setInspector, setNullpublic LazyStruct(LazySimpleStructObjectInspector oi)
public void init(ByteArrayRef bytes, int start, int length)
init in interface LazyObjectBaseinit in class LazyNonPrimitive<LazySimpleStructObjectInspector>bytes - The wrapper of the byte[].start - The start position inside the bytes.length - The length of the data, starting from "start"LazyObject.init(ByteArrayRef, int, int)protected final void initLazyFields(List<? extends StructField> fieldRefs)
protected LazyObjectBase createLazyField(int fieldID, StructField fieldRef) throws SerDeException
SerDeExceptionpublic Object getField(int fieldID)
getField in interface StructObjectfieldID - The field IDpublic List<Object> getFieldsAsList()
getFieldsAsList in interface StructObjectprotected boolean getParsed()
protected void setParsed(boolean parsed)
protected LazyObjectBase[] getFields()
protected void setFields(LazyObject[] fields)
protected boolean[] getFieldInited()
protected void setFieldInited(boolean[] fieldInited)
public long getRawDataSerializedSize()
SerDeStatsStructgetRawDataSerializedSize in interface SerDeStatsStructpublic void parseMultiDelimit(byte[] rawRow,
byte[] fieldDelimit)
public byte[] getBytes()
Copyright © 2017 The Apache Software Foundation. All rights reserved.