org.apache.hadoop.hive.serde2.columnar
Class ColumnarStructBase

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.columnar.ColumnarStructBase
All Implemented Interfaces:
SerDeStatsStruct
Direct Known Subclasses:
ColumnarStruct, LazyBinaryColumnarStruct

public abstract class ColumnarStructBase
extends Object
implements SerDeStatsStruct


Constructor Summary
ColumnarStructBase(ObjectInspector oi, List<Integer> notSkippedColumnIDs)
           
 
Method Summary
 Object getField(int fieldID)
          Get one field out of the struct.
 ArrayList<Object> getFieldsAsList()
          Get the values of the fields as an ArrayList.
 long getRawDataSerializedSize()
          Rerurns the serialized size of the object.
 void init(BytesRefArrayWritable cols)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnarStructBase

public ColumnarStructBase(ObjectInspector oi,
                          List<Integer> notSkippedColumnIDs)
Method Detail

getField

public Object getField(int fieldID)
Get one field out of the struct. If the field is a primitive field, return the actual object. Otherwise return the LazyObject. This is because PrimitiveObjectInspector does not have control over the object used by the user - the user simply directly use the Object instead of going through Object PrimitiveObjectInspector.get(Object). NOTE: separator and nullSequence has to be the same each time this method is called. These two parameters are used only once to parse each record.

Parameters:
fieldID - The field ID
Returns:
The field as a LazyObject

init

public void init(BytesRefArrayWritable cols)

getFieldsAsList

public ArrayList<Object> getFieldsAsList()
Get the values of the fields as an ArrayList.

Returns:
The values of the fields as an ArrayList.

getRawDataSerializedSize

public long getRawDataSerializedSize()
Description copied from interface: SerDeStatsStruct
Rerurns the serialized size of the object.

Specified by:
getRawDataSerializedSize in interface SerDeStatsStruct


Copyright © 2014 The Apache Software Foundation. All rights reserved.