Skip to content

Conversation

@martint
Copy link
Member

@martint martint commented May 16, 2020

This is needed for higher precision version of the special
datetime functions (localtimestamp, current_timestamp, etc),
since Instant can provide nanosecond precision vs the current
value in milliseconds.

@cla-bot cla-bot bot added the cla-signed label May 16, 2020
Copy link
Member

Choose a reason for hiding this comment

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

In session builder you can leave an overload taking millis, this would improve readability of the code here.

Copy link
Member Author

Choose a reason for hiding this comment

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

We want to discourage usages where it's constructing the Instant from millis. Ideally, all these calls should use Java's datetime to instant conversions instead of using Joda's DateTime .

Copy link
Member

Choose a reason for hiding this comment

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

add @Deprecated too?

(should we have a static check?)

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean by a static check?

Copy link
Member

Choose a reason for hiding this comment

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

Using deprecated in the Javadoc without the annotation.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense. Is it even feasible to do that with checkstyle?

This is needed for higher precision version of the special
datetime functions (localtimestamp, current_timestamp, etc),
since Instant can provide nanosecond precision vs the current
value in milliseconds.
@martint martint force-pushed the session-start-time branch from 936634c to 18ff2e5 Compare May 17, 2020 02:32
@martint martint merged commit 7ff3ace into trinodb:master May 17, 2020
@martint martint added this to the 334 milestone May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants