Fix timestamp handling in JDBC connectors#495
Merged
findepi merged 4 commits intotrinodb:masterfrom Mar 28, 2019
Merged
Conversation
26 tasks
Member
Author
|
cc @vincentpoon |
09b71dc to
aeb4863
Compare
Member
|
Thanks, I learned quite a bit from looking over this PR. I'll update my PRs accordingly. |
e0cc8a1 to
3fbb007
Compare
Member
Author
|
ready for review |
Member
|
Typo |
electrum
approved these changes
Mar 26, 2019
presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/StandardColumnMappings.java
Outdated
Show resolved
Hide resolved
presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/StandardColumnMappings.java
Outdated
Show resolved
Hide resolved
presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/StandardColumnMappings.java
Outdated
Show resolved
Hide resolved
presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/StandardColumnMappings.java
Outdated
Show resolved
Hide resolved
presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/StandardColumnMappings.java
Outdated
Show resolved
Hide resolved
presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java
Outdated
Show resolved
Hide resolved
presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java
Outdated
Show resolved
Hide resolved
presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java
Outdated
Show resolved
Hide resolved
presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java
Outdated
Show resolved
Hide resolved
presto-postgresql/src/test/java/io/prestosql/plugin/postgresql/TestPostgreSqlTypeMapping.java
Outdated
Show resolved
Hide resolved
`java.sql.Timestamp` (used by Tempto and Presto JDBC connectors), Joda Time and Java Time differ in their time zone offset information for historic dates. We cannot guarantee correct results for these dates. See 42c3375 for a similar change for date values.
The existing `timestamp` handling was not correct, regardless of timestamp semantics. This commit introduces - as good as possible timestamp handling that is guaranteed to work (using `java.sql.Timestamp`) - timestamp handling that can work, if only driver supports `LocalDateTime` - tests for PostgreSQL
Member
Author
|
ac |
3fbb007 to
e63f768
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing
timestamphandling was not correct, regardless oftimestamp semantics.
This commit introduces
(using
java.sql.Timestamp)LocalDateTime