Skip to content

Conversation

@rdblue
Copy link

@rdblue rdblue commented Aug 23, 2024

As I go through apache#9008, I'll go ahead and make changes and accumulate them here.

@rdblue rdblue force-pushed the jgm-timestamp-nanos-api branch from 448f797 to dedeb19 Compare August 23, 2024 22:55
return Math.toIntExact(convertNanos(nanos, ChronoUnit.HOURS));
}

private static long convertNanos(long nanos, ChronoUnit granularity) {
Copy link
Author

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) {
Copy link
Author

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.

Copy link
Owner

@jacobmarble jacobmarble 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 for the added tests and comments!

@jacobmarble jacobmarble merged commit 20e7085 into jacobmarble:jgm-timestamp-nanos-api Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants