Skip to content

Conversation

IKAZUCHI-Akira
Copy link
Contributor

…e accuracy range of timestamp

Proposed changes

Issue Number: close #585

Problem Summary:

fixed the issue of not handling negative values when process the accuracy range of timestamp

Checklist(Required)

  1. Does it affect the original behavior: (Yes)
  2. Has unit tests been added: (No)
  3. Has document been added or modified: (No Need)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

} else if (time > -10_000_000_000_000L && time < 10_000_000_000_000L) { // milli second
instant = Instant.ofEpochMilli(time);
} else { // micro second
instant = Instant.ofEpochSecond(time / 1_000_000, (time % 1_000_000) * 1_000);
Copy link
Member

Choose a reason for hiding this comment

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

It is better to add a case to cover the lower boundary value

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.

[Bug] not handle negative values when process the accuracy range of datetime

2 participants