return ObjectInspectorFactory.getStandardListObjectInspector(getJavaObjectInspector(type.getTypeParameters().get(0))); else if (isMapType(type)) { ObjectInspector keyObjectInspector = getJavaObjectInspector(type.getTypeParameters().get(0)); ObjectInspector valueObjectInspector = getJavaObjectInspector(type.getTypeParameters().get(1));
if (isArrayType(type) || isMapType(type) || isRowType(type)) { return getJavaObjectInspector(type);
if (isMapType(type)) { return new MapFieldSetter(rowInspector, row, field, type.getTypeParameters().get(0), type.getTypeParameters().get(1));
if (isMapType(type)) { Type keyType = type.getTypeParameters().get(0); Type valueType = type.getTypeParameters().get(1);
return getListTypeInfo(elementType); if (isMapType(type)) { TypeInfo keyType = translate(type.getTypeParameters().get(0)); TypeInfo valueType = translate(type.getTypeParameters().get(1));
return toArrayValue(block, elementType); else if (isMapType(type)) { MapType mapType = (MapType) type; return toMapValue(block, mapType.getKeyType(), mapType.getValueType());
public static ObjectInspector getRowColumnInspector(Type type) { if (type.equals(BooleanType.BOOLEAN)) { return writableBooleanObjectInspector; } if (type.equals(BigintType.BIGINT)) { return writableLongObjectInspector; } if (type.equals(DoubleType.DOUBLE)) { return writableDoubleObjectInspector; } if (type.equals(VarcharType.VARCHAR)) { return writableStringObjectInspector; } if (type.equals(VarbinaryType.VARBINARY)) { return writableBinaryObjectInspector; } if (type.equals(DateType.DATE)) { return writableDateObjectInspector; } if (type.equals(TimestampType.TIMESTAMP)) { return writableTimestampObjectInspector; } if (isArrayType(type) || isMapType(type) || isRowType(type)) { return getJavaObjectInspector(type); } throw new IllegalArgumentException("unsupported type: " + type); }
return ObjectInspectorFactory.getStandardListObjectInspector(getJavaObjectInspector(type.getTypeParameters().get(0))); else if (isMapType(type)) { ObjectInspector keyObjectInspector = getJavaObjectInspector(type.getTypeParameters().get(0)); ObjectInspector valueObjectInspector = getJavaObjectInspector(type.getTypeParameters().get(1));
if (isMapType(type)) { return new MapFieldSetter(rowInspector, row, field, type.getTypeParameters().get(0), type.getTypeParameters().get(1));
return getListTypeInfo(elementType); if (isMapType(type)) { TypeInfo keyType = toTypeInfo(type.getTypeParameters().get(0)); TypeInfo valueType = toTypeInfo(type.getTypeParameters().get(1));
if (isMapType(type)) { Type keyType = type.getTypeParameters().get(0); Type valueType = type.getTypeParameters().get(1);
return toArrayValue(block, elementType); else if (isMapType(type)) { MapType mapType = (MapType) type; return toMapValue(block, mapType.getKeyType(), mapType.getValueType());