Java Code Examples for org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory#getListTypeInfo()

The following examples show how to use org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory#getListTypeInfo() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: flink   File: HiveTypeUtil.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public TypeInfo visit(ArrayType arrayType) {
	LogicalType elementType = arrayType.getElementType();
	TypeInfo elementTypeInfo = elementType.accept(new TypeInfoLogicalTypeVisitor(dataType));
	if (null != elementTypeInfo) {
		return TypeInfoFactory.getListTypeInfo(elementTypeInfo);
	} else {
		return defaultMethod(arrayType);
	}
}
 
Example 2
Source Project: flink   File: HiveTypeUtil.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public TypeInfo visit(ArrayType arrayType) {
	LogicalType elementType = arrayType.getElementType();
	TypeInfo elementTypeInfo = elementType.accept(this);
	if (null != elementTypeInfo) {
		return TypeInfoFactory.getListTypeInfo(elementTypeInfo);
	} else {
		return defaultMethod(arrayType);
	}
}
 
Example 3
private TypeInfo getTypeInfo(ColumnDefinition columnDefinition) throws SerDeException {
  String fieldType = columnDefinition.getFieldType();
  TypeInfo typeInfo = getTypeInfo(fieldType);
  if (columnDefinition.isMultiValueField()) {
    return TypeInfoFactory.getListTypeInfo(typeInfo);
  }
  return typeInfo;
}
 
Example 4
Source Project: streamx   File: HiveSchemaConverter.java    License: Apache License 2.0 4 votes vote down vote up
public static TypeInfo convertArray(Schema schema) {
  return TypeInfoFactory.getListTypeInfo(convert(schema.valueSchema()));
}
 
Example 5
@Override
public TypeInfo getSupportedHiveType() {
  return TypeInfoFactory.getListTypeInfo(TypeInfoFactory.binaryTypeInfo);
}
 
Example 6
@Override
public TypeInfo getSupportedHiveType() {
  return TypeInfoFactory.getListTypeInfo(TypeInfoFactory.stringTypeInfo);
}