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(proto): fix missing timezone parameter in timestamp translation #182

Closed
wants to merge 3 commits into from

Conversation

rtpsw
Copy link
Contributor

@rtpsw rtpsw commented Apr 29, 2022

See #181

@rtpsw rtpsw changed the title Fix missing timezone parameter in timestamp translation feat(proto): Fix missing timezone parameter in timestamp translation May 1, 2022
@rtpsw
Copy link
Contributor Author

rtpsw commented May 1, 2022

@cpcloud, it looks like commitlint fails due to checking more than just the last commit message, which I thought would be the one to be selected in the eventual squashing. How to handle this error?

@rtpsw rtpsw changed the title feat(proto): Fix missing timezone parameter in timestamp translation feat(proto): fix missing timezone parameter in timestamp translation May 1, 2022
@cpcloud
Copy link
Member

cpcloud commented May 1, 2022

This looks like a custom extension to substrait and a modification of the spec outside of the main substrait-io/substrait repo.

Regarding the actual change, the TimetampTZ type is intentionally without a timezone. It only indicates that there is a timezone. The design is similar to the way time zones work in most relational databases like postgres (see https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES).

That said, unlike postgres there's nothing documented in substrait saying that a TimestampTZ is assumed to be UTC so we should nail that down.

@rtpsw
Copy link
Contributor Author

rtpsw commented May 2, 2022

Thanks, I wasn't aware that spec changes need to go to substrait-io/substrait.

Given TimezoneTZ does not carry a timezone, how should a timezone value be represented within a Substrait plan? I think such a timezone value is needed for casting of a time-string to a specific timezone. Currently, in related Arrow code, I see a default timezone value is used.

I'm OK with canceling this PR if the conclusion is that a timezone value is not needed and only the Substrait docs need to be fixed.

@rtpsw
Copy link
Contributor Author

rtpsw commented May 10, 2022

@cpcloud - ping. See question here.

@cpcloud
Copy link
Member

cpcloud commented May 10, 2022

@rtpsw Is there a use case you have that requires a change to the substrait spec? If so, let's discuss in the substrait-io repo and close this PR out! Thanks!

@rtpsw
Copy link
Contributor Author

rtpsw commented May 10, 2022

Created substrait-io/substrait#190 for the discussion.

@rtpsw rtpsw closed this May 10, 2022
@rtpsw rtpsw deleted the GH-181 branch May 12, 2022 10:58
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

Successfully merging this pull request may close these issues.

2 participants