use of org.apache.hadoop.hive.serde2.objectinspector.SettableUnionObjectInspector in project hive by apache.
the class VectorDeserializeRow method convertUnionRowColumn.
private Object convertUnionRowColumn(ColumnVector colVector, int batchIndex, Field field) throws IOException {
final SettableUnionObjectInspector unionOI = (SettableUnionObjectInspector) field.objectInspector;
final UnionComplexTypeHelper unionHelper = (UnionComplexTypeHelper) field.getComplexHelper();
final Field[] fields = unionHelper.getFields();
final UnionColumnVector unionColumnVector = (UnionColumnVector) colVector;
final Object union = unionOI.create();
final int tag = deserializeRead.currentInt;
unionOI.setFieldAndTag(union, new StandardUnion((byte) tag, convertComplexFieldRowColumn(unionColumnVector.fields[tag], batchIndex, fields[tag])), (byte) tag);
deserializeRead.finishComplexVariableFieldsType();
return union;
}
Aggregations