-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Add timestamp logicaltype #36705
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 timestamp logicaltype #36705
Conversation
|
R: @ahmedabu98 |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new Timestamp logical type, which is a great addition for handling timestamps with configurable precision in Beam schemas. The implementation is solid and the accompanying tests are very thorough, covering a wide range of positive, negative, and edge cases. I have a couple of suggestions to improve the implementation's readability, maintainability, and performance, mainly around avoiding magic numbers for field access and replacing Math.pow with a more efficient alternative.
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/logicaltypes/Timestamp.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/logicaltypes/Timestamp.java
Show resolved
Hide resolved
damccorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Add timestamp logical type as described in https://s.apache.org/beam-timestamp-strategy
beam/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/schema.proto
Line 117 in 2c2211e
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.