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

Flink Jira Bot updated FLINK-17481:
-----------------------------------
    Labels: stale-major  (was: )

> Cannot set LocalDateTime column as rowtime when converting DataStream to Table
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-17481
>                 URL: https://issues.apache.org/jira/browse/FLINK-17481
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Planner
>            Reporter: Gyula Fora
>            Priority: Major
>              Labels: stale-major
>
> I am trying to convert an embedded LocalDateTime timestamp into a rowtime 
> column while converting from DataStream to table.
> {code:java}
> DataStream<Tuple1<LocalDateTime>> in = 
> env.fromElements(Tuple1.of(LocalDateTime.now()))
>  .returns(new 
> TupleTypeInfo<>(LocalTimeTypeInfo.getInfoFor(LocalDateTime.class)));
> tableEnv.sqlQuery("select * FROM " + tableEnv.fromDataStream(in, 
> "f0.rowtime"));{code}
> Unfortunately this leads to the following error:
> {noformat}
> org.apache.flink.table.api.ValidationException: The rowtime attribute can 
> only replace a field with a valid time type, such as Timestamp or Long. But 
> was: LocalDateTime{noformat}
> It seems that only java.sql.Timestamp classes are supported for rowtime 
> conversion now.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to