-
Notifications
You must be signed in to change notification settings - Fork 761
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
Add Interval suppport #1752
Add Interval suppport #1752
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
Codecov Report
@@ Coverage Diff @@
## master #1752 +/- ##
======================================
- Coverage 72% 72% -1%
======================================
Files 610 610
Lines 36452 36549 +97
======================================
+ Hits 26357 26410 +53
- Misses 10095 10139 +44
Continue to review full report at Codecov.
|
some extra info: In arrow there are 3 interval formats, all of which arrow2 supports: Interval in months ( There is also the "duration" with 4 units (sec, milli, micro, nano) stored as |
Thanks Jorge, is the Interval(Year) in arrows based on real life calander ? For example the one @sundy-li mentioned:
|
Exactly, |
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, we can add arithmetic ops for the interval type in another pr.
CI Passed |
I hereby agree to the terms of the CLA available at: https://datafuse.rs/policies/cla/
Summary
Add toInterval support. The usage can be like "select interval '1' day". with the pattern of "Interval '[num]' [unit]".
Changelog
Related Issues
Fixes #issue
Test Plan
Unit Tests
Manual tested with mysql and clickhouse client. Test sql includes:
"select interval '1' year"
"select now() + interval '1' year" // this will hit to arithmetic, which is not implemented yet.