Title: Message Title
ASF GitHub Bot commented on FLINK-5481
Re: Cannot create Collection of Row
Github user tonycox commented on the issue:
https://github.com/apache/flink/pull/3127
I suggest add a little bit more sugar ```java TypeInformation infoNew = RowTypeInfo.from( new String[] {"1c", "2c"}, RowTypeInfo.from( new String[]{"1.1", "1.2c"}, String.class, String.class), RowTypeInfo.from( new String[]{"2.1c", "2.2c"}, String.class, String.class)); instead of TypeInformation infoOld = new RowTypeInfo( new TypeInformation[]{ new RowTypeInfo( new TypeInformation[]{ BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO}, new String[]{"1.1", "1.2c"}), new RowTypeInfo( new TypeInformation[]{ BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO}, new String[]{"2.1c", "2.2c"} )}, new String[]{"1c", "2c"}
); ``` ```scala val infoNew = RowTypeInfo.from( Array("person", "additional"), RowTypeInfo.from( Array("name", "age"), classOf[String], classOf[String]), RowTypeInfo.from( Array("name", "age"), classOf[String], classOf[String]) )
instead of
val infoOld = new RowTypeInfo( Array[TypeInformation[_]]( new RowTypeInfo( Array[TypeInformation[_]]( BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO), Array("name", "age")), new RowTypeInfo( Array[TypeInformation[_]]( BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO), Array("more_info", "and_so_on"))), Array("person", "additional") ) ```
Add Comment
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)