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

[BEAM-14541]: fix Cloud Datastore Timestamp value conversion #17789

Merged
merged 2 commits into from
Jun 14, 2022
Merged

[BEAM-14541]: fix Cloud Datastore Timestamp value conversion #17789

merged 2 commits into from
Jun 14, 2022

Conversation

yixiaoshen
Copy link
Contributor

Current code does the conversion by first manually calculating the millis from a proto Timestamp with long millis = time.getSeconds() * 1000 + time.getNanos() / 1000, but 1 millisecond = 1,000,000 nanoseconds instead of 1,000. This PR changes to use proto Timestamps util class to do the conversion in order to be less prone to such mistakes.

R: @chamikaramj


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@asf-ci
Copy link

asf-ci commented Jun 1, 2022

Can one of the admins verify this patch?

2 similar comments
@asf-ci
Copy link

asf-ci commented Jun 1, 2022

Can one of the admins verify this patch?

@asf-ci
Copy link

asf-ci commented Jun 1, 2022

Can one of the admins verify this patch?

@yixiaoshen
Copy link
Contributor Author

R: @pcostell

@pcostell
Copy link

pcostell commented Jun 6, 2022

LGTM from Datastore

@chamikaramj
Copy link
Contributor

LGTM. Thanks.

@chamikaramj
Copy link
Contributor

Run Java PreCommit

2 similar comments
@chamikaramj
Copy link
Contributor

Run Java PreCommit

@chamikaramj
Copy link
Contributor

Run Java PreCommit

@chamikaramj chamikaramj merged commit 94e2400 into apache:master Jun 14, 2022
@yixiaoshen yixiaoshen deleted the ys-firestore-beam-readtime branch June 17, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants