|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive
org.apache.hadoop.hive.serde2.lazy.LazyStruct
public class LazyStruct
LazyObject for storing a struct. The field of a struct can be primitive or non-primitive. LazyStruct does not deal with the case of a NULL struct. That is handled by LazySimpleStructObjectInspector.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive |
---|
bytes, length, start |
Constructor Summary | |
---|---|
LazyStruct(TypeInfo typeInfo)
Construct a LazyStruct object with the TypeInfo. |
Method Summary | |
---|---|
Object |
getField(int fieldID,
byte separator,
org.apache.hadoop.io.Text nullSequence,
boolean lastColumnTakesRest)
Get one field out of the struct. |
ArrayList<Object> |
getFieldsAsList(byte separator,
org.apache.hadoop.io.Text nullSequence,
boolean lastColumnTakesRest)
Get the values of the fields as an ArrayList. |
Object |
getObject()
If the LazyObject is a primitive Object, then deserialize it and return the actual primitive Object. |
void |
init(ByteArrayRef bytes,
int start,
int length)
Set the row data for this LazyStruct. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LazyStruct(TypeInfo typeInfo)
typeInfo
- the TypeInfo representing the type of this LazyStruct.Method Detail |
---|
public void init(ByteArrayRef bytes, int start, int length)
init
in interface LazyObject
init
in class LazyNonPrimitive
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)
public Object getField(int fieldID, byte separator, org.apache.hadoop.io.Text nullSequence, boolean lastColumnTakesRest)
fieldID
- The field IDseparator
- The separator for delimiting the fields in the byte[]nullSequence
- The sequence for null valuelastColumnTakesRest
- Whether the additional fields should be all
put into the last column in case the data
contains more columns than the schema.
public ArrayList<Object> getFieldsAsList(byte separator, org.apache.hadoop.io.Text nullSequence, boolean lastColumnTakesRest)
separator
- The separator for delimiting the fields in the byte[]nullSequence
- The sequence for the NULL valuelastColumnTakesRest
- Whether the additional fields should be all
put into the last column in case the data
contains more columns than the schema.
public Object getObject()
LazyObject
getObject
in interface LazyObject
getObject
in class LazyNonPrimitive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |