flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Walther (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-8255) Key expressions on named rows types do not work
Date Wed, 13 Dec 2017 15:53:02 GMT
Timo Walther created FLINK-8255:
-----------------------------------

             Summary: Key expressions on named rows types do not work
                 Key: FLINK-8255
                 URL: https://issues.apache.org/jira/browse/FLINK-8255
             Project: Flink
          Issue Type: Bug
          Components: DataSet API, DataStream API
            Reporter: Timo Walther


The following program fails with a {{ClassCastException}}. It seems that key expressions and
rows are not tested well. We should add more tests for them.

{code}
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

TypeInformation[] types = new TypeInformation[] {Types.INT, Types.INT};

String[] fieldNames = new String[]{"id", "value"};
RowTypeInfo rowTypeInfo = new RowTypeInfo(types, fieldNames);

env.fromCollection(Collections.singleton(new Row(2)), rowTypeInfo)
.keyBy("id").sum("value").print();

env.execute("Streaming WordCount");
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message