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

Partial timestamp support #346

Closed
dlurton opened this issue Apr 24, 2023 · 2 comments
Closed

Partial timestamp support #346

dlurton opened this issue Apr 24, 2023 · 2 comments

Comments

@dlurton
Copy link
Member

dlurton commented Apr 24, 2023

According to this comment timestamps aren't supported yet. Let's change that.

Since my team isn't using PartiQL Rust's parser and are instead interfacing directly with the IR, and we have a very specific use-case for timestamps, full support for timestamps is not required.

Here's the minimal subset of timestamp support that my team needs that I am currently aware of:

  • A representation in enum Value for timestamps with at least microsecond precision.
  • Support for using timestamps in = and <= operators.

At this time, my team does not need:

  • Support for timestamps in the parser.
  • Functions to manipulate timestamps (e.g. to_timestamp, date_add, etc)
  • The ability to represent timestamps with arbitrary precision.

Which will hopefully make this request relatively bite-sized.

@alancai98
Copy link
Member

According to this comment timestamps aren't supported yet. Let's change that.

We currently have support for timestamps as of the v0.3.0 release:

DateTime(Box<DateTime>),
Perhaps you were looking at an older version of partiql-lang-rust?

  • A representation in enum Value for timestamps with at least microsecond precision.
  • Support for using timestamps in = and <= operators.

The current time and timestamp values support precision of nanosecond and have an impl/derived implementation for = and <= operators.

Regarding your other points,

  • We are working to add support for timestamps in the parser through Adds lowering of DATE, TIME, and TIMESTAMP literals to logical plan #345. You can already add parse Ion timestamps in the parser with the backticks
  • We plan to add some more datetime-related functions. Are there any you think you'll need in particular?
  • We haven't yet started representing timestamps with arbitrary precision

@dlurton
Copy link
Member Author

dlurton commented Apr 24, 2023

Oh, well, I guess I stand corrected! Didn't realize my local copy was out so of date. 😳 Thanks.

@dlurton dlurton closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants