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

Add support for (UT/UTC/GMT)(+/-)H[H] time zone IDs in from_unixtime and at_timezone Presto UDFs #11411

Closed

Conversation

kevinwilfong
Copy link
Contributor

Summary:
Presto Java and Joda support time zone IDs that look like UT+1, UTC-12, GMT+3, Etc/UT-1,
Etc/UTC+7, Etc/GMT-2. Of these Velox only supports the Etc/GMT prefix. This diff adds support for
all 6.

They all map to the offset number of hours in the suffix (except Etc/GMT which flips the sign
for some reason). E.g. UT+1 maps to +01:00, while Etc/GMT-2 maps to +02:00.

Differential Revision: D65366170

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65366170

Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 68b728e
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67256a698eff1700087674ae

…and at_timezone Presto UDFs (facebookincubator#11411)

Summary:

Presto Java and Joda support time zone IDs that look like UT+1, UTC-12, GMT+3, Etc/UT-1, 
Etc/UTC+7, Etc/GMT-2.  Of these Velox only supports the Etc/GMT prefix.  This diff adds support for
all 6.

They all map to the offset number of hours in the suffix (except Etc/GMT which flips the sign
for some reason).  E.g. UT+1 maps to +01:00, while Etc/GMT-2 maps to +02:00.

Differential Revision: D65366170
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65366170

Copy link
Contributor

@amitkdutta amitkdutta left a comment

Choose a reason for hiding this comment

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

Thanks @kevinwilfong

@liujiayi771
Copy link
Contributor

liujiayi771 commented Nov 2, 2024

Hi @kevinwilfong, Could you take a look at this PR #11114? I am currently developing timezone normalization for Spark, which includes all the timezones supported by Spark (In the description). Could you help to see which of these are supported by Presto? If they are also supported by Presto, I can add them to the common call section for both Presto and Spark.

If there are timezone formats that Presto does not support, I think they can also be added to the normalization rules. The timezone formats supported by Velox can be the union of those supported by both Presto and Spark, which would not impact user usage.

cc @rui-mo @PHILO-HE @pedroerp.

@PHILO-HE
Copy link
Contributor

PHILO-HE commented Nov 4, 2024

Hi @kevinwilfong, Could you take a look at this PR #11114? I am currently developing timezone normalization for Spark, which includes all the timezones supported by Spark (In the description). Could you help to see which of these are supported by Presto? If they are also supported by Presto, I can add them to the common call section for both Presto and Spark.

If there are timezone formats that Presto does not support, I think they can also be added to the normalization rules. The timezone formats supported by Velox can be the union of those supported by both Presto and Spark, which would not impact user usage.

cc @rui-mo @PHILO-HE @pedroerp.

I agree. The current timezone normalization in TimezoneMap can be extended for both Spark and Presto, assuming there is no semantic conflict case.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 7fde3c6.

Copy link

Conbench analyzed the 1 benchmark run on commit 7fde3c6b.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants