org.apache.hadoop.hive.serde2.lazy
Class LazyArray

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazy.LazyObjectBase
      extended by org.apache.hadoop.hive.serde2.lazy.LazyObject<OI>
          extended by org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive<LazyListObjectInspector>
              extended by org.apache.hadoop.hive.serde2.lazy.LazyArray

public class LazyArray
extends LazyNonPrimitive<LazyListObjectInspector>

LazyArray stores an array of Lazy Objects. LazyArray does not deal with the case of a NULL array. That is handled by the parent LazyObject.


Field Summary
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive
bytes, length, start
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
oi
 
Constructor Summary
protected LazyArray(LazyListObjectInspector oi)
          Construct a LazyArray object with the ObjectInspector.
 
Method Summary
 List<Object> getList()
          Returns the List of actual primitive objects.
 Object getListElementObject(int index)
          Returns the actual primitive object at the index position inside the array represented by this LazyObject.
 int getListLength()
          Returns -1 for null array.
 void init(ByteArrayRef bytes, int start, int length)
          Set the row data for this LazyArray.
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive
getObject, hashCode
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
getInspector, setInspector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyArray

protected LazyArray(LazyListObjectInspector oi)
Construct a LazyArray object with the ObjectInspector.

Parameters:
oi - the oi representing the type of this LazyArray as well as meta information like separator etc.
Method Detail

init

public void init(ByteArrayRef bytes,
                 int start,
                 int length)
Set the row data for this LazyArray.

Overrides:
init in class LazyNonPrimitive<LazyListObjectInspector>
Parameters:
bytes - The wrapper of the byte[].
start - The start position inside the bytes.
length - The length of the data, starting from "start"
See Also:
LazyObjectBase.init(ByteArrayRef, int, int)

getListElementObject

public Object getListElementObject(int index)
Returns the actual primitive object at the index position inside the array represented by this LazyObject.


getListLength

public int getListLength()
Returns -1 for null array.


getList

public List<Object> getList()
Returns the List of actual primitive objects. Returns null for null array.



Copyright © 2013 The Apache Software Foundation