Hi Sebastián,

it might be the case that some time functions are not correct due to the underlying refactoring of data structures. I will loop in Leonard in CC that currently works on improving this situation as part of FLIP-162 [1].

@Leonard: Is this wrong behavior on your list?

Regards,
Timo


[1] https://cwiki.apache.org/confluence/display/FLINK/FLIP-162%3A+Consistent+Flink+SQL+time+function+behavior




On 02.03.21 12:26, Sebastián Magrí wrote:
While using a simple query such as this

SELECT
    `ts`,
    FLOOR(`ts` TO WEEK) as `week_start`,
    CEIL(`ts` TO WEEK) as `week_end`
FROM some_table

I get some weird results like these:

2021-03-01T00:00|    2021-02-25T00:00|    2021-03-04T00:00

Which is obviously wrong since March 1st is on Monday, February 25th is Thursday as well as March 04th.

I've tried different combinations of timezone configurations and with both timestamps and dates, with the same results.

Is there anything obviously wrong in that query? Is there any configuration to keep in mind for the start of week day?

--
Sebastián Ramírez Magrí

Reply via email to