org.apache.hadoop.hive.serde2.columnar
Class ColumnarStruct
java.lang.Object
org.apache.hadoop.hive.serde2.columnar.ColumnarStructBase
org.apache.hadoop.hive.serde2.columnar.ColumnarStruct
- All Implemented Interfaces:
- SerDeStatsStruct
public class ColumnarStruct
- extends ColumnarStructBase
ColumnarStruct is different from LazyStruct in that ColumnarStruct's field
Object get parsed at its initialize time when call
ColumnarStructBase.init(BytesRefArrayWritable cols)
, while LazyStruct parse fields in a
lazy way.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColumnarStruct
public ColumnarStruct(ObjectInspector oi)
- Construct a ColumnarStruct object with the TypeInfo. It creates the first
level object at the first place
- Parameters:
oi
- the ObjectInspector representing the type of this LazyStruct.
ColumnarStruct
public ColumnarStruct(ObjectInspector oi,
ArrayList<Integer> notSkippedColumnIDs,
org.apache.hadoop.io.Text nullSequence)
- Construct a ColumnarStruct object with the TypeInfo. It creates the first
level object at the first place
- Parameters:
oi
- the ObjectInspector representing the type of this LazyStruct.notSkippedColumnIDs
- the column ids that should not be skipped
getLength
protected int getLength(ObjectInspector objectInspector,
ByteArrayRef cachedByteArrayRef,
int start,
int fieldLen)
- Description copied from class:
ColumnarStructBase
- Check if the object is null and return the length of the stream
- Specified by:
getLength
in class ColumnarStructBase
cachedByteArrayRef
- the bytes of the objectstart
- the start offsetfieldLen
- the length
- Returns:
- -1 for null, >=0 for length
createLazyObjectBase
protected LazyObjectBase createLazyObjectBase(ObjectInspector objectInspector)
- Description copied from class:
ColumnarStructBase
- create the lazy object for this field
- Specified by:
createLazyObjectBase
in class ColumnarStructBase
- Parameters:
objectInspector
- the object inspector for the field
- Returns:
- the lazy object for the field
Copyright © 2013 The Apache Software Foundation