Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use historic dates in SQL Server tests
Presto JDBC (used throught Tempto) constructs `java.sql.Date` object from millis calculated with Joda Time. For historic dates, time zone offset information is very likely to be differing between JDK and Joda. As a result, for a date like 0001-01-02, Presto JDBC returns `java.sql.Date` object which (according to JDK zone information) is not pointing at midnight of the desired date. Instead, it's some uneven number of minuts and seconds off. Since the `java.sql.Date#equals` compares timestamp values (not the date value the object is supposed to represent), the test would fail. To avoid problems like that one would use JDK in Presto JDBC exclusively. However, even then mixing old-school classes like `java.sql.Date` and java.time classes is likely not to solve all problems. This is because, even though JDK classes have single time zone database information, they process it differently.
- Loading branch information