Gyula Fora created FLINK-17481:
----------------------------------
Summary: 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
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)