Skip to content
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] Support SQL INTERVAL #3146

Merged

Conversation

austin362667
Copy link
Contributor

The Rationales

Thanks to the great work from @universalmind303 , Daft now supports INTERVAL type exposed from arrow2.

Beyond DataFrame supports, this PR aims to unlock SQL simple INTERVAL usage in SQL syntax, mainly copied from planner.rs.

Notes: This naive impl doesn't fully support complex interval scenarios, like leap year or relative duration addition and subtraction. We might need more carefully handled logic as the follow ups.

Signed-off-by: Austin Liu <[email protected]>

Add `chrono` crate

Signed-off-by: Austin Liu <[email protected]>
@austin362667 austin362667 changed the title Feat/support interval sql [FEAT] Support SQL INTERVAL Oct 29, 2024
@github-actions github-actions bot added the enhancement New feature or request label Oct 29, 2024
Copy link

codspeed-hq bot commented Oct 29, 2024

CodSpeed Performance Report

Merging #3146 will not alter performance

Comparing austin362667:feat/support_interval_sql (6432e48) with main (e84ed5b)

Summary

✅ 17 untouched benchmarks

Copy link
Collaborator

@universalmind303 universalmind303 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @austin362667 this looks pretty good for the most part. One more small change, then I think we can merge it in!

src/daft-sql/src/planner.rs Show resolved Hide resolved
Signed-off-by: Austin Liu <[email protected]>

Remove `chrono` crate

Signed-off-by: Austin Liu <[email protected]>
@universalmind303 universalmind303 merged commit 701a011 into Eventual-Inc:main Oct 30, 2024
38 checks passed
sagiahrac pushed a commit to sagiahrac/Daft that referenced this pull request Nov 4, 2024
## The Rationales

Thanks to the [great
work](Eventual-Inc#3018) from
@universalmind303 , Daft now supports `INTERVAL` type exposed from
`arrow2`.

Beyond DataFrame supports, this PR aims to unlock SQL simple `INTERVAL`
usage in SQL syntax, mainly copied from
[planner.rs](https://github.com/sgl-project/sglang/pull/1790/files#diff-ea02b059cdabc0939616c35c6566dbcf980a5794306dedd241c2823afd9b2db2).

Notes: This naive impl doesn't fully support complex interval scenarios,
like leap year or relative duration addition and subtraction. We might
need more carefully handled logic as the follow ups.

---------

Signed-off-by: Austin Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants