public static boolean isSupportedType(TypeInfo typeInfo) { switch (typeInfo.getCategory()) { case PRIMITIVE: return getPrimitiveType((PrimitiveTypeInfo) typeInfo) != null; case MAP: MapTypeInfo mapTypeInfo = (MapTypeInfo) typeInfo; return isSupportedType(mapTypeInfo.getMapKeyTypeInfo()) && isSupportedType(mapTypeInfo.getMapValueTypeInfo()); case LIST: ListTypeInfo listTypeInfo = (ListTypeInfo) typeInfo; return isSupportedType(listTypeInfo.getListElementTypeInfo()); case STRUCT: StructTypeInfo structTypeInfo = (StructTypeInfo) typeInfo; return structTypeInfo.getAllStructFieldTypeInfos().stream() .allMatch(HiveType::isSupportedType); } return false; }
Type primitiveType = getPrimitiveType((PrimitiveTypeInfo) typeInfo); if (primitiveType == null) { break;
PrimitiveTypeInfo typeInfo = (PrimitiveTypeInfo) type; PrimitiveCategory primitiveCategory = typeInfo.getPrimitiveCategory(); Type prestoType = requireNonNull(HiveType.getPrimitiveType(typeInfo)); switch (primitiveCategory) { case BOOLEAN:
PrimitiveTypeInfo typeInfo = (PrimitiveTypeInfo) type; PrimitiveCategory primitiveCategory = typeInfo.getPrimitiveCategory(); Type prestoType = requireNonNull(HiveType.getPrimitiveType(typeInfo)); switch (primitiveCategory) { case BOOLEAN:
public static boolean isSupportedType(TypeInfo typeInfo) { switch (typeInfo.getCategory()) { case PRIMITIVE: PrimitiveObjectInspector.PrimitiveCategory primitiveCategory = ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory(); return getPrimitiveType(primitiveCategory) != null; case MAP: MapTypeInfo mapTypeInfo = checkType(typeInfo, MapTypeInfo.class, "typeInfo"); return isSupportedType(mapTypeInfo.getMapKeyTypeInfo()) && isSupportedType(mapTypeInfo.getMapValueTypeInfo()); case LIST: ListTypeInfo listTypeInfo = checkType(typeInfo, ListTypeInfo.class, "typeInfo"); return isSupportedType(listTypeInfo.getListElementTypeInfo()); case STRUCT: StructTypeInfo structTypeInfo = checkType(typeInfo, StructTypeInfo.class, "typeInfo"); return structTypeInfo.getAllStructFieldTypeInfos().stream() .allMatch(HiveType::isSupportedType); } return false; }
case PRIMITIVE: PrimitiveObjectInspector.PrimitiveCategory primitiveCategory = ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory(); Type primitiveType = getPrimitiveType(primitiveCategory); if (primitiveType == null) { break;