org.apache.hadoop.hive.serde2.lazy
Class LazyPrimitive<OI extends ObjectInspector,T extends org.apache.hadoop.io.Writable>

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.LazyPrimitive<OI,T>
Direct Known Subclasses:
LazyBigDecimal, LazyBinary, LazyBoolean, LazyByte, LazyDouble, LazyFloat, LazyInteger, LazyLong, LazyShort, LazyString, LazyTimestamp

public abstract class LazyPrimitive<OI extends ObjectInspector,T extends org.apache.hadoop.io.Writable>
extends LazyObject<OI>

LazyPrimitive stores a primitive Object in a LazyObject.


Field Summary
protected  T data
           
protected  boolean isNull
           
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
oi
 
Constructor Summary
protected LazyPrimitive(LazyPrimitive<OI,T> copy)
           
protected LazyPrimitive(OI oi)
           
 
Method Summary
 Object getObject()
          Returns the primitive object represented by this LazyObject.
 T getWritableObject()
           
 int hashCode()
           
 void logExceptionMessage(ByteArrayRef bytes, int start, int length, String dataType)
           
 String toString()
           
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
getInspector, setInspector
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObjectBase
init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

data

protected T extends org.apache.hadoop.io.Writable data

isNull

protected boolean isNull
Constructor Detail

LazyPrimitive

protected LazyPrimitive(OI oi)

LazyPrimitive

protected LazyPrimitive(LazyPrimitive<OI,T> copy)
Method Detail

getObject

public Object getObject()
Returns the primitive object represented by this LazyObject. This is useful because it can make sure we have "null" for null objects.

Specified by:
getObject in class LazyObjectBase

getWritableObject

public T getWritableObject()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Specified by:
hashCode in class LazyObject<OI extends ObjectInspector>

logExceptionMessage

public void logExceptionMessage(ByteArrayRef bytes,
                                int start,
                                int length,
                                String dataType)


Copyright © 2013 The Apache Software Foundation