Re: [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-21 Thread Leonard Xu
Thanks @Timo for the detailed reply. Let’s continue the technical discussion on the former FLIP discussion thread[1]: [DISCUSS] FLIP-162: Consistent Flink SQL time function behavior. We can share our decision to user and user-zh on this thread once we have a final proposal. Best, Leonard

Re: [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-21 Thread Timo Walther
Hi Leonard, thanks for working on this topic. I agree that time handling is not easy in Flink at the moment. We added new time data types (and some are still not supported which even further complicates things like TIME(9)). We should definitely improve this situation for users. This is a

Re: [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-21 Thread Leonard Xu
> Before the changes, as I am writing this reply, the local time here is > 2021-01-21 12:03:35 (Beijing time, UTC+8). > And I tried these 5 functions in sql client, and got: > > Flink SQL> select now(), PROCTIME(), CURRENT_TIMESTAMP, CURRENT_DATE, > CURRENT_TIME; >

Re: [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-20 Thread Jark Wu
t; Best! > zhisheng > > > --原始邮件-- > 发件人: > "dev" > < > xbjt...@gmail.com; > 发送时间:2021年1月19日(星期二) 晚上6:35 > 收件人:"dev" > 主题:Re:

?????? [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-20 Thread zhisheng
Thanks to Leonard Xu for discussing this tricky topic. At present, there are many Flink jobs in our production environment that are used to count day-level reports (eg: count PV/UV ). If use the default Flink SQL, the window time range of the statistics is incorrect, then the statistical

Re: [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-20 Thread Kurt Young
cc this to user & user-zh mailing list because this will affect lots of users, and also quite a lot of users were asking questions around this topic. Let me try to understand this from user's perspective. Your proposal will affect five functions, which are: - PROCTIME() - NOW() -

Re: [DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-19 Thread Leonard Xu
I found above example format may mess up in different mail client, I post a picture here[1]. Best, Leonard [1] https://github.com/leonardBang/flink-sql-etl/blob/master/etl-job/src/main/resources/pictures/CURRRENT_TIMESTAMP.png

[DISCUSS] Correct time-related function behavior in Flink SQL

2021-01-19 Thread Leonard Xu
Hi, all I want to start the discussion about correcting time-related function behavior in Flink SQL, this is a tricky topic but I think it’s time to address it. Currently some temporal function behaviors are wired to users. 1. When users use a PROCTIME() in SQL, the value of PROCTIME() has a