[ https://issues.apache.org/jira/browse/FLINK-8853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther updated FLINK-8853: -------------------------------- Issue Type: Sub-task (was: Bug) Parent: FLINK-7594 > SQL Client cannot emit query results that contain a rowtime attribute > --------------------------------------------------------------------- > > Key: FLINK-8853 > URL: https://issues.apache.org/jira/browse/FLINK-8853 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Affects Versions: 1.5.0 > Reporter: Fabian Hueske > Assignee: Timo Walther > Priority: Blocker > Fix For: 1.5.0 > > > Emitting a query result that contains a rowtime attribute fails with the > following exception: > {code:java} > Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to > java.lang.Long > at > org.apache.flink.api.common.typeutils.base.LongSerializer.serialize(LongSerializer.java:27) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.serialize(RowSerializer.java:160) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.serialize(RowSerializer.java:46) > at > org.apache.flink.api.java.typeutils.runtime.TupleSerializer.serialize(TupleSerializer.java:125) > at > org.apache.flink.api.java.typeutils.runtime.TupleSerializer.serialize(TupleSerializer.java:30) > at > org.apache.flink.streaming.experimental.CollectSink.invoke(CollectSink.java:66) > ... 44 more{code} > The problem is cause by the {{ResultStore}} which configures the > {{CollectionSink}} with the field types obtained from the {{TableSchema}}. > The type of the rowtime field is a {{TimeIndicatorType}} which is serialized > as Long. However, in the query result it is represented as Timestamp. Hence, > the type must be replaced by a {{SqlTimeTypeInfo<Timestamp>}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)