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.


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 java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

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 © 2014 The Apache Software Foundation. All rights reserved.