-
Notifications
You must be signed in to change notification settings - Fork 0
Review fixes for timestamp_ns API changes #1
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
Review fixes for timestamp_ns API changes #1
Conversation
448f797 to
dedeb19
Compare
| return Math.toIntExact(convertNanos(nanos, ChronoUnit.HOURS)); | ||
| } | ||
|
|
||
| private static long convertNanos(long nanos, ChronoUnit granularity) { |
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.
No need to expose ChronoUnit from this API. I think this fits with the existing conventions better and is more clear.
| } | ||
|
|
||
| @Override | ||
| public boolean satisfiesOrderOf(Transform<?, ?> other) { |
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.
I standardized this implementation across TimeTransform, Dates, and Timestamps and added thorough testing.
jacobmarble
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.
LGTM
Thanks for the added tests and comments!
As I go through apache#9008, I'll go ahead and make changes and accumulate them here.