本文整理了Java中org.apache.flink.api.common.typeinfo.Types.MAP()
方法的一些代码示例,展示了Types.MAP()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.MAP()
方法的具体详情如下:
包路径:org.apache.flink.api.common.typeinfo.Types
类名称:Types
方法名:MAP
[英]Returns type information for a Java java.util.Map. A map must not be null. Null values in keys are not supported. An entry's value can be null.
By default, maps are untyped and treated as a generic type in Flink; therefore, it is useful to pass type information whenever a map is used.
Note: Flink does not preserve the concrete Map type. It converts a map into HashMap when copying or deserializing.
[中]返回Java的类型信息。util。地图映射不能为空。键中不支持空值。条目的值可以为空。
默认情况下,地图是非类型化的,在Flink中被视为泛型类型;因此,在使用映射时传递类型信息非常有用。
注意:Flink不保留具体的贴图类型。它在复制或反序列化时将映射转换为HashMap。
代码示例来源:origin: apache/flink
return Types.MAP(Types.STRING, convertToTypeInfo(schema.getValueType()));
case UNION:
final Schema actualSchema;
代码示例来源:origin: apache/flink
private TypeInformation<?> convertMap() {
nextToken(TokenType.BEGIN);
nextToken(TokenType.LITERAL);
final TypeInformation<?> keyTypeInfo = convertType();
nextToken(TokenType.SEPARATOR);
nextToken(TokenType.LITERAL);
final TypeInformation<?> valueTypeInfo = convertType();
nextToken(TokenType.END);
return Types.MAP(keyTypeInfo, valueTypeInfo);
}
代码示例来源:origin: apache/flink
Types.OBJECT_ARRAY(Types.STRING),
Types.STRING,
Types.MAP(Types.STRING, Types.LONG),
Types.PRIMITIVE_ARRAY(Types.BYTE),
Types.GENERIC(Object.class),
代码示例来源:origin: apache/flink
Types.MAP(Types.STRING, Types.ROW(Types.BIG_DEC, Types.BYTE)));
代码示例来源:origin: com.alibaba.blink/flink-avro
return Types.MAP(Types.STRING, convertToTypeInfo(schema.getValueType()));
case UNION:
final Schema actualSchema;
代码示例来源:origin: org.apache.flink/flink-avro
return Types.MAP(Types.STRING, convertToTypeInfo(schema.getValueType()));
case UNION:
final Schema actualSchema;
代码示例来源:origin: com.alibaba.blink/flink-table-common
private TypeInformation<?> convertMap() {
nextToken(TokenType.BEGIN);
nextToken(TokenType.LITERAL);
final TypeInformation<?> keyTypeInfo = convertType();
nextToken(TokenType.SEPARATOR);
nextToken(TokenType.LITERAL);
final TypeInformation<?> valueTypeInfo = convertType();
nextToken(TokenType.END);
return Types.MAP(keyTypeInfo, valueTypeInfo);
}
代码示例来源:origin: org.apache.flink/flink-table-common
private TypeInformation<?> convertMap() {
nextToken(TokenType.BEGIN);
nextToken(TokenType.LITERAL);
final TypeInformation<?> keyTypeInfo = convertType();
nextToken(TokenType.SEPARATOR);
nextToken(TokenType.LITERAL);
final TypeInformation<?> valueTypeInfo = convertType();
nextToken(TokenType.END);
return Types.MAP(keyTypeInfo, valueTypeInfo);
}
内容来源于网络,如有侵权,请联系作者删除!