Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timestamp handling in JDBC connectors #495

Merged
merged 4 commits into from
Mar 28, 2019

Conversation

findepi
Copy link
Member

@findepi findepi commented Mar 18, 2019

The existing timestamp handling was not correct, regardless of
timestamp semantics.

This commit introduces

  • as good as possible timestamp hanlding that is guaranteed to work
    (using java.sql.Timestamp)
  • timestamp handling that can work, if only driver supports
    LocalDateTime
  • tests for Postgres

@findepi
Copy link
Member Author

findepi commented Mar 18, 2019

cc @vincentpoon
This relates to #76, #317

@findepi findepi force-pushed the findepi/pgtimestamp branch 2 times, most recently from 09b71dc to aeb4863 Compare March 18, 2019 15:55
@vincentpoon
Copy link
Member

Thanks, I learned quite a bit from looking over this PR. I'll update my PRs accordingly.

@findepi findepi force-pushed the findepi/pgtimestamp branch 7 times, most recently from e0cc8a1 to 3fbb007 Compare March 21, 2019 10:12
@findepi
Copy link
Member Author

findepi commented Mar 21, 2019

ready for review

@findepi findepi requested a review from electrum March 21, 2019 11:37
@electrum
Copy link
Member

Typo hanlding in commit message

`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
@findepi
Copy link
Member Author

findepi commented Mar 27, 2019

ac

@findepi findepi merged commit 9175452 into trinodb:master Mar 28, 2019
@findepi findepi added this to the 307 milestone Mar 28, 2019
@findepi findepi mentioned this pull request Mar 28, 2019
6 tasks
@findepi findepi deleted the findepi/pgtimestamp branch March 28, 2019 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants