New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-21621] [table-planner] Support TIMESTAMP_LTZ arithmetic #15133
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 3ff8f4a (Wed Mar 10 07:25:42 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
cc @KurtYoung Could you help review this? thanks |
...r-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
Outdated
Show resolved
Hide resolved
...r-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
Outdated
Show resolved
Hide resolved
...r-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
Outdated
Show resolved
Hide resolved
...r-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
Outdated
Show resolved
Hide resolved
...r-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
Outdated
Show resolved
Hide resolved
9ba579d
to
2a1a5b4
Compare
2a1a5b4
to
6ffe48b
Compare
...r-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
Outdated
Show resolved
Hide resolved
...nner-blink/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
Show resolved
Hide resolved
...nner-blink/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
Outdated
Show resolved
Hide resolved
6ffe48b
to
b632dd2
Compare
Could you help take a look? @KurtYoung @wuchong |
testSqlApi( | ||
s"TIMESTAMPDIFF(MINUTE, ${timestampTz("1970-01-01 01:02:03.123")}," + | ||
s" ${timestampTz("1970-01-01 00:00:00")})", | ||
"-62") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be 62
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, you can look TIMESTAMPDIFF(MINUTE , TIMESTAMP, TIMESTAMP)
testSqlApi( | ||
s"TIMESTAMPDIFF(SECOND, ${timestampTz("1970-01-01 00:00:00.123")}," + | ||
s" ${timestampTz("1970-01-01 00:02:03.234")})", | ||
"123") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be -123
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What is the purpose of the change
TIMESTAMP_LTZ + interval '1' DAY
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation