[ https://issues.apache.org/jira/browse/FLINK-23885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Caizhi Weng updated FLINK-23885: -------------------------------- Component/s: API / DataStream > DataStream<Integer>#map(int value -> row value).getType() produces a generic > type info of row instead of row type info > ---------------------------------------------------------------------------------------------------------------------- > > Key: FLINK-23885 > URL: https://issues.apache.org/jira/browse/FLINK-23885 > Project: Flink > Issue Type: Bug > Components: API / DataStream > Affects Versions: 1.14.0 > Reporter: Caizhi Weng > Priority: Major > > This is reported by the user in the [mailing > list|https://lists.apache.org/thread.html/r975eb2a638a120d7c739fd177bf8a16283585fd0457ba8fd4bfce65a%40%3Cuser.flink.apache.org%3E]. > Run the following test to reproduce this problem. > {code:java} > @Test > public void myTest() { > StreamExecutionEnvironment flinkEnv = > StreamExecutionEnvironment.getExecutionEnvironment(); > flinkEnv.setRuntimeMode(RuntimeExecutionMode.STREAMING); > DataStream<Integer> integers = flinkEnv.fromElements(12, 5); > DataStream<Row> rows1 = integers.map(i -> Row.of("Name" + i, i)); > DataStream<Row> rows2 = flinkEnv.fromElements(Row.of("Name12", 12), > Row.of("Name5", 5)); > System.out.println(rows1.getType()); // > GenericType<org.apache.flink.types.Row> > System.out.println(rows2.getType()); // Row(f0: String, f1: Integer) > } > {code} > As shown in the test, {{rows1.getType()}} produces a generic type of row > instead of row type. -- This message was sent by Atlassian Jira (v8.3.4#803005)