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

Normalize date and time value annotations #82

Open
alancai98 opened this issue Apr 13, 2023 · 2 comments
Open

Normalize date and time value annotations #82

alancai98 opened this issue Apr 13, 2023 · 2 comments

Comments

@alancai98
Copy link
Member

I noticed that some TIME values in the test data use an annotated struct:

e.g.:

{ 'data_value': $time::{'hour':12, 'minute':12, 'second':12.1,'timezone_hour':null.int,'timezone_minute':null.int} },

While some other TIME values use an annotated string:

e.g.

logs: [{sensor:1, co:0.4, timestamp: $time::"04:05:06"}, // ex in spec used an undocumented timestamp
{sensor:1, co:0.2, timestamp: $time::"04:05:07"}, // syntax. changed to use time annotation
{sensor:1, co:0.5, timestamp: $time::"04:05:10"}, // in the test suite
{sensor:2, co:0.3}

The partiql-tests spec proposal defines using the annotated string form: https://github.com/partiql/partiql-tests/blob/e24d8ef837303e675bc7c29b8a41f3cc81d6b96e/docs/partiql-tests-schema-proposal.md#modeling-partiql-types-in-ion.

These should likely be normalized to the same thing.

TODO:

  • Also sort out the modeling of other time/timestamp types that use timezone
@alancai98 alancai98 changed the title Normalize time value annotations Normalize date and time value annotations Apr 13, 2023
@alancai98
Copy link
Member Author

date is also modeled using a timestamp in some tests

{ 'data_value': $date::2021-08-22 },

The spec proposal uses an annotated string: https://github.com/partiql/partiql-tests/blob/e24d8ef837303e675bc7c29b8a41f3cc81d6b96e/docs/partiql-tests-schema-proposal.md#modeling-partiql-types-in-ion.

@alancai98
Copy link
Member Author

Also need to normalize how PartiQL timestamps are to be represented in Ion (could be the same as Ion?)

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

1 participant