-
Notifications
You must be signed in to change notification settings - Fork 329
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!: implement interval type by multiple structs #4772
Conversation
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes primarily focus on enhancing the handling of interval types across multiple files in the codebase. The Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@coderabbitai summary |
✅ Actions performedSummary regeneration triggered. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4772 +/- ##
==========================================
- Coverage 84.55% 84.45% -0.11%
==========================================
Files 1117 1117
Lines 202644 202670 +26
==========================================
- Hits 171353 171159 -194
- Misses 31291 31511 +220 |
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
@@ -30,6 +29,7 @@ use crate::types::{DateTimeType, DateType}; | |||
use crate::value::{Value, ValueRef}; | |||
use crate::vectors::{MutableVector, PrimitiveVector, PrimitiveVectorBuilder, Vector}; | |||
|
|||
// TODO(yingwen): Can we remove `Into<serde_json::Value>`? |
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.
We will be able to remove this trait bound once we change the Serializable implementation here: https://github.com/GrepTimeTeam/greptimedb/blob/314f2704d49d407e87152931b0050d677c8edc7a/src/datatypes/src/vectors/primitive.rs#L254
I'm going to merge this if there are no further comments. @waynexia Are you going to check this PR? |
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
This PR uses three dedicated interval structs to replace the old all-in-one interval struct.
IntervalYearMonth
IntervalDayTime
IntervalMonthDayNano
Before this PR, some behaviors of the interval struct is incorrect as it always assumes a month has 30 days and a year has 365 days.
Upgrading arrow requires this feature.
It also removes the datetime support for
date_add
anddate_sub
as arrow doesn't support datetime arithmetic.Checklist
Summary by CodeRabbit
New Features
Date
,DateTime
,Timestamp
, andInterval
modules, enhancing clarity and precision.IntervalYearMonth
,IntervalDayTime
, andIntervalMonthDayNano
.Bug Fixes
DateTime
type handling inDateAddFunction
andDateSubFunction
.Refactor
Tests