You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ゞ野蠻遊戲χ <zh...@vip.qq.com> on 2020/12/26 15:15:52 UTC

table rowtime timezome problem

Hi all
&nbsp; &nbsp; &nbsp; &nbsp; When DataStream is converted to table, eventTime is converted to rowTime. Rowtime is 8 hours slow. How to solve this problem?
Thanks
Jiazhi

Re: table rowtime timezome problem

Posted by Leonard Xu <xb...@gmail.com>.
Hi,Jiazhi

>         When DataStream is converted to table, eventTime is converted to rowTime. Rowtime is 8 hours slow. How to solve this problem?

The reason is that the only data type that used to define an event time in Table/SQL is TIMESTAMP(3), and TIMESTAMP type isn’t related to your local time zone(UTC+8) which caused the timezone problem. You can workaround this by converting your TIMESTAMP with your timezone offset before query start and convert the TIMESTAMP back after query end.

And I think the best way to resolve this problem is to support defining event time on data type TIMESTAMP WITH LOCAL TIME ZONE, this is a known issue and the roadmap which we hope to improve it in Flink 1.13.


Best,
Leonard