table rowtime timezome problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

table rowtime timezome problem

ゞ野蠻遊戲χ
Hi all
        When DataStream is converted to table, eventTime is converted to rowTime. Rowtime is 8 hours slow. How to solve this problem?
Thanks
Jiazhi
Reply | Threaded
Open this post in threaded view
|

Re: table rowtime timezome problem

Leonard Xu
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