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

Fix date_diff() bug across time zone boundaries #11053

Closed
wants to merge 1 commit into from

Conversation

pedroerp
Copy link
Contributor

Summary:
Date diff calculation for timestamp with time zone types need to be
performed in the time zone of the first parameter to follow Presto's semantic.
Timestamp calculation normalized to UTC may not return the same result if the
interval crosses a daylight savings time.

Differential Revision: D63159202

@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 Sep 21, 2024
Copy link

netlify bot commented Sep 21, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 4009e6d
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/66ef28dd3ca46a00088f0ac9

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

pedroerp added a commit to pedroerp/velox-1 that referenced this pull request Sep 21, 2024
)

Summary:
Pull Request resolved: facebookincubator#11053

Date diff calculation for timestamp with time zone types need to be
performed in the time zone of the first parameter to follow Presto's semantic.
Timestamp calculation normalized to UTC may not return the same result if the
interval crosses a daylight savings time.

Differential Revision: D63159202
)

Summary:
Pull Request resolved: facebookincubator#11053

Date diff calculation for timestamp with time zone types need to be
performed in the time zone of the first parameter to follow Presto's semantic.
Timestamp calculation normalized to UTC may not return the same result if the
interval crosses a daylight savings time.

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

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

Copy link
Contributor

@kgpai kgpai left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Pedro !

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4e45bc5.

Copy link

Conbench analyzed the 1 benchmark run on commit 4e45bc51.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

athmaja-n pushed a commit to athmaja-n/velox that referenced this pull request Jan 10, 2025
)

Summary:
Pull Request resolved: facebookincubator#11053

Date diff calculation for timestamp with time zone types need to be
performed in the time zone of the first parameter to follow Presto's semantic.
Timestamp calculation normalized to UTC may not return the same result if the
interval crosses a daylight savings time.

Reviewed By: amitkdutta, kgpai

Differential Revision: D63159202

fbshipit-source-id: fb8eaf10dc6e8ab14e8eb635ff64ce2be4939823
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.

3 participants