[ https://issues.apache.org/jira/browse/FLINK-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16001046#comment-16001046 ]
ASF GitHub Bot commented on FLINK-6476: --------------------------------------- GitHub user rtudoran opened a pull request: https://github.com/apache/flink/pull/3847 [FLINK-6476] - Table environment register row data stream Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration. If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html). In addition to going through the list, please provide a meaningful description of your changes. - [x ] General - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text") - The pull request addresses only one issue - Each commit in the PR has a meaningful commit message (including the JIRA id) - [x ] Documentation - Documentation has been added for new functionality - Old documentation affected by the pull request has been updated - JavaDoc for public methods has been added - [x ] Tests & Build - Functionality added by the pull request is covered by tests - `mvn clean verify` has been executed successfully locally or a Travis build has passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/huawei-flink/flink FLINK-6476Re3 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3847.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3847 ---- commit bfe2882b298d5abd5bbfabbcd79481d2003cba91 Author: rtudoran <tudoranr...@ymail.com> Date: 2017-05-08T16:26:43Z Add support for registering streams of Row type as tables ---- > Table environment register row data stream > ------------------------------------------ > > Key: FLINK-6476 > URL: https://issues.apache.org/jira/browse/FLINK-6476 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL > Environment: java/scala > Reporter: radu > Assignee: radu > Labels: feature, patch > > Registering as table source streams with Row is currently not possible: > Java: > DataStream<Row> ds = ... > tableEnv.registerDataStream("MyTableRow", ds, "a, b, c ..."); > org.apache.flink.table.api.TableException: Source of type Row(f0: Integer, > f1: Long, f2: Integer, f3: String, f4: Integer) cannot be converted into > Table. > at > org.apache.flink.table.api.TableEnvironment.getFieldInfo(TableEnvironment.scala:680) > at > org.apache.flink.table.api.StreamTableEnvironment.registerDataStreamInternal(StreamTableEnvironment.scala:363) > at > org.apache.flink.table.api.java.StreamTableEnvironment.registerDataStream(StreamTableEnvironment.scala:133) > at > org.apache.flink.table.api.java.stream.sql.SqlITCase.testRow2(SqlITCase.java:92) > Scala: > val ds:DataStream[Row] = ... > tableEnv.registerDataStream("MyTableRow", ds, "a, b, c, d, e"); > org.apache.flink.api.java.typeutils.GenericTypeInfo cannot be cast to > org.apache.flink.api.common.typeutils.CompositeType > This can be supported by extending the in the > org.apache.flink.table.api.TableEnvironment > getFieldInfo() > and by constructing the StreamTableSource correspondingly -- This message was sent by Atlassian JIRA (v6.3.15#6346)