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

Zijie Lu commented on FLINK-14099:
----------------------------------

I use a kafka connector and describe a schema as rowtime which is from field 
"timestamp". And the timestamp in the kafka message is unix timestamp in second 
which means it is a Long.

And the code is as following:

*new Schema()*
 *.field("rowtime", Types.SQL_TIMESTAMP)*
*.rowtime(new 
Rowtime().timestampsFromField("timestamp").watermarksPeriodicAscending())*
 *.field("requestId", Types.STRING)*

 

And the following expections are throwed. 

*Caused by: java.time.format.DateTimeParseException: Text '1568772929' could 
not be parsed at index 0*
 *at 
java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)*
 *at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1777)*
 *at 
org.apache.flink.formats.json.JsonRowDeserializationSchema.lambda$createTimestampConverter$1dee6515$1(JsonRowDeserializationSchema.java:334)*
 *at 
org.apache.flink.formats.json.JsonRowDeserializationSchema.lambda$wrapIntoNullableConverter$d586c97$1(JsonRowDeserializationSchema.java:232)*
 *at 
org.apache.flink.formats.json.JsonRowDeserializationSchema.convertField(JsonRowDeserializationSchema.java:403)*
 *at 
org.apache.flink.formats.json.JsonRowDeserializationSchema.lambda$assembleRowConverter$77f7700$1(JsonRowDeserializationSchema.java:382)*
 *at 
org.apache.flink.formats.json.JsonRowDeserializationSchema.lambda$wrapIntoNullableConverter$d586c97$1(JsonRowDeserializationSchema.java:232)*
 *at 
org.apache.flink.formats.json.JsonRowDeserializationSchema.deserialize(JsonRowDeserializationSchema.java:127)*
 *... 7 more*

> SQL supports timestamp in Long
> ------------------------------
>
>                 Key: FLINK-14099
>                 URL: https://issues.apache.org/jira/browse/FLINK-14099
>             Project: Flink
>          Issue Type: New Feature
>            Reporter: Zijie Lu
>            Priority: Major
>
> The rowtime only supports sql timestamp but not long. Can the rowtime field 
> supports long?



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

Reply via email to