-
Notifications
You must be signed in to change notification settings - Fork 707
feat: support date_trunc function
#6365
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
Conversation
133d513 to
d65c75e
Compare
BowenXiao1999
left a comment
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.
LSTM!
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
6a83a72 to
8e0d5b9
Compare
xiangjinwu
left a comment
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.
rest lgtm
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #6365 +/- ##
==========================================
- Coverage 74.28% 74.06% -0.22%
==========================================
Files 960 966 +6
Lines 156525 157164 +639
==========================================
+ Hits 116277 116406 +129
- Misses 40248 40758 +510
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 |
Signed-off-by: Runji Wang <[email protected]>
* implement truncate for NaiveDateTime Signed-off-by: Runji Wang <[email protected]> * implement truncate for IntervalUnit Signed-off-by: Runji Wang <[email protected]> * implement `date_trunc` function Signed-off-by: Runji Wang <[email protected]> * fix truncate century and millennium for timestamp Signed-off-by: Runji Wang <[email protected]> * update date_trunc e2e test Signed-off-by: Runji Wang <[email protected]> * fix date_trunc for timestampz Signed-off-by: Runji Wang <[email protected]> * remove trailing '00:00:00' Signed-off-by: Runji Wang <[email protected]> * add placeholder for truncate_millis Signed-off-by: Runji Wang <[email protected]> * remove trailing '00:00:00' Signed-off-by: Runji Wang <[email protected]> * update dashboard proto Signed-off-by: Runji Wang <[email protected]> Signed-off-by: Runji Wang <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR adds support for
date_truncfunction.Checklist
./risedev check(or alias,./risedev c)Documentation
If your pull request contains user-facing changes, please specify the types of the changes, and create a release note. Otherwise, please feel free to remove this section.
Types of user-facing changes
Please keep the types that apply to your changes, and remove those that do not apply.
Release note
Please create a release note for your changes. In the release note, focus on the impact on users, and mention the environment or conditions where the impact may occur.
As documented in postgres: https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC.
Except that
timezonemust be specified ifsourceis a timestamp with time zone:Reason: #6365 (comment).
Refer to a related PR or issue link (optional)
resolve #6301