-
Notifications
You must be signed in to change notification settings - Fork 598
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
feat(expr): convert timestamp with time zone
from/to unix epoch seconds
#5910
Conversation
ci error seems irrelevant: #5911 |
Codecov Report
@@ Coverage Diff @@
## main #5910 +/- ##
==========================================
+ Coverage 74.85% 74.89% +0.03%
==========================================
Files 922 924 +2
Lines 146824 147014 +190
==========================================
+ Hits 109911 110103 +192
+ Misses 36913 36911 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Looks great!
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Support the following exprs:
to_timestamp(seconds: double precision) -> timestamp with time zone
extract(epoch from timestamp with time zone) -> seconds: decimal
This also updates the parser to allow arbitrary string as extract units, to align with PostgreSQL.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Types of user-facing changes
Release note
timestamp with time zone
from seconds since unix epoch viato_timestamp
.timestamp with time zone
to seconds since unix epoch viaextract(epoch from)
.Refer to a related PR or issue link (optional)
#5805 (comment)
#5826
#5588
Fixes #5859