use of io.trino.testing.TestingConnectorSession in project trino by trinodb.
the class TestDateTimeFunctions method assertCurrentDateAtInstant.
private void assertCurrentDateAtInstant(TimeZoneKey timeZoneKey, Instant instant) {
long expectedDays = epochDaysInZone(timeZoneKey, instant);
TestingConnectorSession connectorSession = TestingConnectorSession.builder().setStart(instant).setTimeZoneKey(timeZoneKey).build();
long dateTimeCalculation = currentDate(connectorSession);
assertEquals(dateTimeCalculation, expectedDays);
}
Aggregations