public class VectorizedBatchUtil extends Object
Constructor and Description |
---|
VectorizedBatchUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
acidAddRowToBatch(Object row,
StructObjectInspector oi,
int rowIndex,
org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
VectorizedRowBatchCtx context,
org.apache.hadoop.io.DataOutputBuffer buffer)
Iterates thru all the columns in a given row and populates the batch
from a given offset
|
static void |
addProjectedRowToBatchFrom(Object row,
StructObjectInspector oi,
int rowIndex,
org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
org.apache.hadoop.io.DataOutputBuffer buffer)
Add only the projected column of a regular row to the specified vectorized row batch
|
static void |
addRowToBatchFrom(Object row,
StructObjectInspector oi,
int rowIndex,
int colOffset,
org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
org.apache.hadoop.io.DataOutputBuffer buffer)
Iterates thru all the columns in a given row and populates the batch
from a given offset
|
static String[] |
columnNamesFromStructObjectInspector(StructObjectInspector structObjectInspector) |
static StandardStructObjectInspector |
convertToStandardStructObjectInspector(StructObjectInspector structObjectInspector) |
static org.apache.hadoop.hive.ql.exec.vector.ColumnVector |
createColumnVector(String typeName) |
static org.apache.hadoop.hive.ql.exec.vector.ColumnVector |
createColumnVector(TypeInfo typeInfo) |
static void |
debugDisplayBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
String prefix) |
static void |
debugDisplayOneRow(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
int index,
String prefix) |
static StringBuilder |
debugFormatOneRow(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
int index,
String prefix,
StringBuilder sb) |
static String |
displayBytes(byte[] bytes,
int start,
int length) |
static org.apache.hadoop.io.Writable |
getPrimitiveWritable(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory) |
static org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch |
makeLike(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch)
Make a new (scratch) batch, which is exactly "like" the batch provided, except that it's empty
|
static void |
setBatchSize(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
int size)
Reduce the batch size for a vectorized row batch
|
static void |
setNoNullFields(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch)
Iterates thru all the column vectors and sets noNull to
specified value.
|
static void |
setNullColIsNullValue(org.apache.hadoop.hive.ql.exec.vector.ColumnVector cv,
int rowIndex)
Sets the IsNull value for ColumnVector at specified index
|
static void |
setRepeatingColumn(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
int column)
Iterates thru all the column vectors and sets repeating to
specified column.
|
static TypeInfo[] |
typeInfosFromStructObjectInspector(StructObjectInspector structObjectInspector) |
static TypeInfo[] |
typeInfosFromTypeNames(String[] typeNames) |
public static void setNullColIsNullValue(org.apache.hadoop.hive.ql.exec.vector.ColumnVector cv, int rowIndex)
cv
- rowIndex
- public static void setNoNullFields(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch)
batch
- Batch on which noNull is setpublic static void setRepeatingColumn(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, int column)
public static void setBatchSize(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, int size)
public static org.apache.hadoop.hive.ql.exec.vector.ColumnVector createColumnVector(String typeName)
public static org.apache.hadoop.hive.ql.exec.vector.ColumnVector createColumnVector(TypeInfo typeInfo)
public static void addRowToBatchFrom(Object row, StructObjectInspector oi, int rowIndex, int colOffset, org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, org.apache.hadoop.io.DataOutputBuffer buffer) throws HiveException
row
- Deserialized row objectoi
- Object insepector for that rowrowIndex
- index to which the row should be added to batchcolOffset
- offset from where the column beginsbatch
- Vectorized batch to which the row is added at rowIndexHiveException
public static void addProjectedRowToBatchFrom(Object row, StructObjectInspector oi, int rowIndex, org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, org.apache.hadoop.io.DataOutputBuffer buffer) throws HiveException
row
- the regular rowoi
- object inspector for the rowrowIndex
- the offset to add in the batchbatch
- vectorized row batchbuffer
- data output bufferHiveException
public static void acidAddRowToBatch(Object row, StructObjectInspector oi, int rowIndex, org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, VectorizedRowBatchCtx context, org.apache.hadoop.io.DataOutputBuffer buffer) throws HiveException
row
- Deserialized row objectoi
- Object insepector for that rowrowIndex
- index to which the row should be added to batchbatch
- Vectorized batch to which the row is added at rowIndexcontext
- context object for this vectorized batchbuffer
- HiveException
public static StandardStructObjectInspector convertToStandardStructObjectInspector(StructObjectInspector structObjectInspector) throws HiveException
HiveException
public static String[] columnNamesFromStructObjectInspector(StructObjectInspector structObjectInspector) throws HiveException
HiveException
public static TypeInfo[] typeInfosFromTypeNames(String[] typeNames) throws HiveException
HiveException
public static TypeInfo[] typeInfosFromStructObjectInspector(StructObjectInspector structObjectInspector)
public static org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch makeLike(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) throws HiveException
batch
- the batch to imitateHiveException
public static org.apache.hadoop.io.Writable getPrimitiveWritable(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
public static String displayBytes(byte[] bytes, int start, int length)
public static void debugDisplayOneRow(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, int index, String prefix)
public static StringBuilder debugFormatOneRow(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, int index, String prefix, StringBuilder sb)
public static void debugDisplayBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch, String prefix)
Copyright © 2021 The Apache Software Foundation. All rights reserved.