use of org.apache.hadoop.hive.ql.exec.persistence.UnwrapRowContainer in project hive by apache.
the class MapJoinOperator method getValueObjectInspectors.
@Override
protected List<ObjectInspector> getValueObjectInspectors(byte alias, List<ObjectInspector>[] aliasToObjectInspectors) {
int[] valueIndex = conf.getValueIndex(alias);
if (valueIndex == null) {
return super.getValueObjectInspectors(alias, aliasToObjectInspectors);
}
List<ObjectInspector> inspectors = aliasToObjectInspectors[alias];
int bigPos = conf.getPosBigTable();
Converter[] converters = new Converter[valueIndex.length];
List<ObjectInspector> valueOI = new ArrayList<ObjectInspector>();
for (int i = 0; i < valueIndex.length; i++) {
if (valueIndex[i] >= 0 && !joinKeysObjectInspectors[bigPos].isEmpty()) {
if (conf.getNoOuterJoin()) {
valueOI.add(joinKeysObjectInspectors[bigPos].get(valueIndex[i]));
} else {
// It is an outer join. We are going to add the inspector from the
// inner side, but the key value will come from the outer side, so
// we need to create a converter from inputOI to outputOI.
valueOI.add(inspectors.get(i));
converters[i] = ObjectInspectorConverters.getConverter(joinKeysObjectInspectors[bigPos].get(valueIndex[i]), inspectors.get(i));
}
} else {
valueOI.add(inspectors.get(i));
}
}
unwrapContainer[alias] = new UnwrapRowContainer(alias, valueIndex, converters, hasFilter(alias));
return valueOI;
}
Aggregations