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

[V1] Complete datetime and interval types #1657

Open
4 of 13 tasks
Tracked by #1602
rchowell opened this issue Nov 26, 2024 · 4 comments
Open
4 of 13 tasks
Tracked by #1602

[V1] Complete datetime and interval types #1657

rchowell opened this issue Nov 26, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rchowell
Copy link
Contributor

rchowell commented Nov 26, 2024

Description

PartiQL does not implement the SQL datetime operators; here's what needs to be done: see SQL-99 4.7.3 p.29.

Working PR – #1656

Tasks

  • Define datetime on datum
  • Define interval on ptype
  • Define interval on datum
  • Add INTERVAL_YM and INTERVAL_DT to PTYPE
  • datetime - datetime -> interval
  • datetime + interval -> datetime
  • datetime - interval -> datetime
  • interval + datetime -> datetime
  • interval + interval -> interval
  • interval - interval -> interval
  • interval * numeric -> interval
  • interval / numeric -> interval
  • numeric * interval -> interval
@rchowell rchowell added the enhancement New feature or request label Nov 26, 2024
@rchowell rchowell changed the title Add all datetime operators. [V1] Complete datetime and interval types Nov 27, 2024
@rchowell rchowell self-assigned this Nov 27, 2024
@rchowell
Copy link
Contributor Author

Awaiting PR feedback on additions to Datum before fixing the build hence still draft. Fixing the builtin functions will be a lot of work which is subject to change based upon the modeling.

@rchowell
Copy link
Contributor Author

need rebase on #1658

@rchowell
Copy link
Contributor Author

After that, I'll address the build. Working on plans now.

@alancai98
Copy link
Member

Adding INTERVAL was attempted in #1656. A potential lesson learned is that Java's duration and period may not properly model SQL's INTERVAL semantics. Still need some further investigation here. We may need to introduce a separate class to model properly.

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

No branches or pull requests

2 participants