You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Tzu-Li (Gordon) Tai (JIRA)" <ji...@apache.org> on 2018/03/12 15:33:00 UTC

[jira] [Closed] (FLINK-8012) Table with time attribute cannot be written to CsvTableSink

     [ https://issues.apache.org/jira/browse/FLINK-8012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tzu-Li (Gordon) Tai closed FLINK-8012.
--------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 1.3.3)
                   1.3.4

> Table with time attribute cannot be written to CsvTableSink
> -----------------------------------------------------------
>
>                 Key: FLINK-8012
>                 URL: https://issues.apache.org/jira/browse/FLINK-8012
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>    Affects Versions: 1.4.0, 1.3.2
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>            Priority: Critical
>             Fix For: 1.5.0, 1.3.4, 1.4.0
>
>
> A Table with a time attribute ({{TimeIndicatorTypeInfo}}) cannot be written to a {{CsvTableSink}}.
> Trying to do so results in the following exception:
> {code}
> Exception in thread "main" org.apache.flink.table.api.TableException: The time indicator type is an internal type only.
> 	at org.apache.flink.table.api.TableEnvironment.org$apache$flink$table$api$TableEnvironment$$validateFieldType$1(TableEnvironment.scala:937)
> 	at org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$2.apply(TableEnvironment.scala:963)
> 	at org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$2.apply(TableEnvironment.scala:960)
> 	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
> 	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
> 	at org.apache.flink.table.api.TableEnvironment.generateRowConverterFunction(TableEnvironment.scala:960)
> 	at org.apache.flink.table.api.StreamTableEnvironment.getConversionMapper(StreamTableEnvironment.scala:289)
> 	at org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:810)
> 	at org.apache.flink.table.api.StreamTableEnvironment.writeToSink(StreamTableEnvironment.scala:263)
> 	at org.apache.flink.table.api.Table.writeToSink(table.scala:857)
> 	at org.apache.flink.table.api.Table.writeToSink(table.scala:830)
> {code}
> The time attribute should be automatically converted into a {{SQL_TIMESTAMP}} type.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)