flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6476) Table environment register row data stream
Date Mon, 08 May 2017 15:40:04 GMT

    [ https://issues.apache.org/jira/browse/FLINK-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000937#comment-16000937
] 

ASF GitHub Bot commented on FLINK-6476:
---------------------------------------

Github user rtudoran commented on the issue:

    https://github.com/apache/flink/pull/3845
  
    @fhueske  
    
    Please have a look. I inserted tests in scala and java to check the registration of the
stream.
    For scala - it seemed to work directly if the implicit value is set (i did not know to
test this before opening the JIRA).
    For java - i have added the needed support in TableEnvironment.
    
    it is not much...i hope i did not miss anything


> 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)

Mime
View raw message