Skip to content

Commit

Permalink
Add timestamp test case before epoch with fraction
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Sep 22, 2020
1 parent 093709c commit ee3cdc6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,10 @@ public void testTimestamp(boolean insertWithPresto, ZoneId sessionZone)
tests.addRoundTrip(timestampDataType(5), LocalDateTime.of(1970, 1, 1, 0, 0, 0, 123_450_000));
tests.addRoundTrip(timestampDataType(6), LocalDateTime.of(1970, 1, 1, 0, 0, 0, 123_456_000));

// before epoch with second fraction
tests.addRoundTrip(timestampDataType(6), LocalDateTime.of(1969, 12, 31, 23, 59, 59, 123_000_000));
tests.addRoundTrip(timestampDataType(6), LocalDateTime.of(1969, 12, 31, 23, 59, 59, 123_456_000));

Session session = Session.builder(getQueryRunner().getDefaultSession())
.setTimeZoneKey(TimeZoneKey.getTimeZoneKey(sessionZone.getId()))
.build();
Expand Down

0 comments on commit ee3cdc6

Please sign in to comment.