use of org.apache.hadoop.hive.serde2.objectinspector.SettableListObjectInspector in project hive by apache.
the class VectorDeserializeRow method convertListRowColumn.
private Object convertListRowColumn(ColumnVector colVector, int batchIndex, Field field) throws IOException {
final SettableListObjectInspector listOI = (SettableListObjectInspector) field.objectInspector;
final ListComplexTypeHelper listHelper = (ListComplexTypeHelper) field.getComplexHelper();
final Field elementField = listHelper.getElementField();
final List<Object> tempList = new ArrayList<>();
final ListColumnVector listColumnVector = (ListColumnVector) colVector;
while (deserializeRead.isNextComplexMultiValue()) {
tempList.add(convertComplexFieldRowColumn(listColumnVector.child, batchIndex, elementField));
}
final int size = tempList.size();
final Object list = listOI.create(size);
for (int i = 0; i < size; i++) {
listOI.set(list, i, tempList.get(i));
}
return list;
}
Aggregations