Java Code Examples for org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory#getMapTypeInfo()
The following examples show how to use
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory#getMapTypeInfo() .
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 File: HiveTypeUtil.java From flink with Apache License 2.0 | 5 votes |
@Override public TypeInfo visit(MapType mapType) { LogicalType keyType = mapType.getKeyType(); LogicalType valueType = mapType.getValueType(); TypeInfo keyTypeInfo = keyType.accept(new TypeInfoLogicalTypeVisitor(dataType)); TypeInfo valueTypeInfo = valueType.accept(new TypeInfoLogicalTypeVisitor(dataType)); if (null == keyTypeInfo || null == valueTypeInfo) { return defaultMethod(mapType); } else { return TypeInfoFactory.getMapTypeInfo(keyTypeInfo, valueTypeInfo); } }
Example 2
Source File: HiveTypeUtil.java From flink with Apache License 2.0 | 5 votes |
@Override public TypeInfo visit(MapType mapType) { LogicalType keyType = mapType.getKeyType(); LogicalType valueType = mapType.getValueType(); TypeInfo keyTypeInfo = keyType.accept(this); TypeInfo valueTypeInfo = valueType.accept(this); if (null == keyTypeInfo || null == valueTypeInfo) { return defaultMethod(mapType); } else { return TypeInfoFactory.getMapTypeInfo(keyTypeInfo, valueTypeInfo); } }
Example 3
Source File: HiveSchemaConverter.java From streamx with Apache License 2.0 | 4 votes |
public static TypeInfo convertMap(Schema schema) { return TypeInfoFactory.getMapTypeInfo( convert(schema.keySchema()), convert(schema.valueSchema())); }
Example 4
Source File: HiveDynamoDBItemType.java From emr-dynamodb-connector with Apache License 2.0 | 4 votes |
@Override public TypeInfo getSupportedHiveType() { return TypeInfoFactory.getMapTypeInfo(TypeInfoFactory.stringTypeInfo, TypeInfoFactory.stringTypeInfo); }