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-7939) DataStream of atomic type cannot be converted to Table with time attributes
Date Wed, 01 Nov 2017 01:54:00 GMT

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

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

Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4917


> DataStream of atomic type cannot be converted to Table with time attributes
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-7939
>                 URL: https://issues.apache.org/jira/browse/FLINK-7939
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.4.0, 1.3.3
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>            Priority: Major
>             Fix For: 1.4.0, 1.3.3
>
>
> A DataStream of an atomic type, such as {{DataStream<String>}} or {{DataStream<Long>}}
cannot be converted into a {{Table}} with a time attribute.
> {code}
> DataStream<String> stream = ...
> Table table = tEnv.fromDataStream(stream, "string, rowtime.rowtime")
> {code}
> yields
> {code}
> Exception in thread "main" org.apache.flink.table.api.TableException: Field reference
expression requested.
>     at org.apache.flink.table.api.TableEnvironment$$anonfun$1.apply(TableEnvironment.scala:630)
>     at org.apache.flink.table.api.TableEnvironment$$anonfun$1.apply(TableEnvironment.scala:624)
>     at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
>     at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
>     at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
>     at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
>     at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
>     at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186)
>     at org.apache.flink.table.api.TableEnvironment.getFieldInfo(TableEnvironment.scala:624)
>     at org.apache.flink.table.api.StreamTableEnvironment.registerDataStreamInternal(StreamTableEnvironment.scala:398)
>     at org.apache.flink.table.api.scala.StreamTableEnvironment.fromDataStream(StreamTableEnvironment.scala:85)
> {code}
> As a workaround the atomic type can be wrapped in {{Tuple1}}, i.e., convert a {{DataStream<String>}}
into a {{DataStream<Tuple1<String>>}}.



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

Mime
View raw message