-
Notifications
You must be signed in to change notification settings - Fork 843
feat(query): add interval type #16990
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
drmingdrmer
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.
The meta data part looks good to me. Do not forget to add a new version test:
Reviewed 4 of 42 files at r1.
Reviewable status: 4 of 42 files reviewed, all discussions resolved
b43edcf to
add4db2
Compare
|
wait databendlabs/bendsql#517 merge |
17816e4 to
9e58cd9
Compare
|
@TCeason, when this is completed, will we be able to write such conversion as |
Yes, the results are quite similar. I’ve encountered a few issues currently, and I’ll add some similar tests later. |
Excellent, this will hopefully make it easy to wrap in SQLAlchemy for Python 👍 |
drmingdrmer
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.
Reviewed 2 of 33 files at r4.
Reviewable status: 6 of 72 files reviewed, 1 unresolved discussion (waiting on @sundy-li and @TCeason)
|
Marking this as a draft: Compression support for FixedSizeBinaryColumn is required when using the fs storage type. Implementation is targeted for completion next week. |
drmingdrmer
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.
Reviewed 3 of 19 files at r9, all commit messages.
Reviewable status: 6 of 78 files reviewed, 1 unresolved discussion (waiting on @sundy-li and @TCeason)
:) select to_interval('02:01'), to_interval('1 year 1 day 1 hour');
┌───────────────────────────────────────────────────────────┐
│ to_interval('02:01') │ to_interval('1 year 1 day 1 hour') │
│ Interval │ Interval │
├──────────────────────┼────────────────────────────────────┤
│ 2:01:00 │ 1year 1day 1:00:00 │
└───────────────────────────────────────────────────────────┘
078b30d to
be2fa7b
Compare
|
@soyeric128 Could you help document the new interval type? Thanks! |

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Support new datatype Interval.
It represent periods of time that can be added to or subtracted from DATE, TIMESTAMP.
Note: Since MySQL does not support the INTERVAL type, querying the INTERVAL type using the MySQL client will result in an error.
Tests
Type of change
This change is