flink
flink copied to clipboard
[FLINK-28929][table] Add built-in datediff function.
What is the purpose of the change
Add built-in datediff function.
CI report:
- f810738d4b609c38319602abce7b5f3b75dcc60d Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build
It would be great if PR message matches PR template. Once is is stated that it could calculate number of days between 2 datetimes it would be nice to see some clarification for corner cases like one datetime in summer time and another datetime in a process of movement to winter datetime (time is same for both) or what if 2 datetimes are with different timezones
@snuyanzin i don't find timestamp with timezone type to construct it

from one side yes there was a jira issue to support it from another side there is a list of functions which could return timestamp with timezone e.g. convert_tz from https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/dev/table/functions/systemfunctions/#temporal-functions
the point is that if we are talking about seconds/minutes/hours then we should expect something like different timezones or summer/winter time
i will create a issue to support the timestamp with time zone with all kind of this temporal function in TimeFunctionsITCase @snuyanzin , whay do you think? then we just focus on this function.
and do you have time to review this https://github.com/apache/flink/pull/20544 and https://github.com/apache/flink/pull/20546 ? and the ci is not green because of kafka end to end test, which is not relate to my pr
does it make sense in that case to support only dates without seconds/minutes/hours?
does it make sense in that case to support only dates without seconds/minutes/hours?
yeap.
@liuyongvs Please make sure that you use and fill in the PR template. Now it requires scanning through the code, to see if tests are added etc.