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

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<LazyUnionObjectInspector>
              extended by org.apache.hadoop.hive.serde2.lazy.LazyUnion

public class LazyUnion
extends LazyNonPrimitive<LazyUnionObjectInspector>

LazyObject for storing a union. The field of a union can be primitive or non-primitive.


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
LazyUnion(LazyUnionObjectInspector oi)
          Construct a LazyUnion object with the ObjectInspector.
 
Method Summary
 Object getField()
          Get the field out of the union.
 byte getTag()
          Get the tag of the union
 void init(ByteArrayRef bytes, int start, int length)
          Set the row data for this LazyUnion.
 
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

LazyUnion

public LazyUnion(LazyUnionObjectInspector oi)
Construct a LazyUnion object with the ObjectInspector.

Method Detail

init

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

Overrides:
init in class LazyNonPrimitive<LazyUnionObjectInspector>
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)

getField

public Object getField()
Get the field out of the union.

Returns:
The field as a LazyObject

getTag

public byte getTag()
Get the tag of the union

Returns:
The tag byte


Copyright © 2013 The Apache Software Foundation