Flink中的地图显示为通用?

时间:2019-02-09 00:58:31

标签: apache-flink

我在 Flink v 1.4.2 的POJO中有一个HashMap,例如:

class CustomObj{
  public Map<String, String> custTable = new HashMap<>();
  //getter and setter
}

runner.java

当我这样做

System.out.println(TypeInformation.of(CustomObj.class));

我得到:

PojoType<CustomObj, fields = [custTable: GenericType<java.util.Map>]>

现在的问题是为什么我尝试将DataSteam<CustomObj>转换为表并运行诸如SELECT * FROM tableName WHERE custTable['key'] = 'val'之类的SQL查询,这给了我一个例外:

org.apache.flink.table.api.TableException: Generic ANY types must have a common type information.

总有办法解决吗?

0 个答案:

没有答案