If your conversion is done using a UDF you need to override the getResultType method [1] to explicitly specify the key and value type information. As generic erasure will not preseve the <String,String> part of your code.
Thanks, Rong [1] https://ci.apache.org/projects/flink/flink-docs-release-1.7/dev/table/udfs.html#scalar-functions On Wed, Mar 27, 2019 at 10:14 AM shkob1 <shahar.kobrin...@gmail.com> wrote: > Im trying to convert a SQL query that has a select map[..] into a pojo with > Map (using tableEnv.toRestractedStream ) > It seems to fail when the field requestedTypeInfo is GenericTypeInfo with > GenericType<java.util.Map> while the field type itself is MapTypeInfo with > Map<String,String> > > > Exception in thread "main" org.apache.flink.table.api.TableException: > Result > field does not match requested type. Requested: GenericType<java.util.Map>; > Actual: Map<String, String> > > Any suggestion? > Shahar > > > > -- > Sent from: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ >