org.apache.flink.api.common.typeinfo.Types.MAP()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(222)

本文整理了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

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);
}

相关文章