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

DATE/TIME/TIMESTAMP/ZONE improvements in base-jdbc and tests #10114

Merged
merged 7 commits into from
Mar 9, 2018
Merged

DATE/TIME/TIMESTAMP/ZONE improvements in base-jdbc and tests #10114

merged 7 commits into from
Mar 9, 2018

Conversation

findepi
Copy link
Contributor

@findepi findepi commented Mar 7, 2018

No description provided.

This moves `AbstractTestQueries#evaluateScalar` method to
`AbstractTestQueryFramework` and renames it to `computeScalar` to better
match other existing methods.
This test must be run against both `LocalQueryRunner` and
`DistributedQueryRunner`, since these runners differ in a way how they
return data.  For this reason it was placed in `AbstractTestQueries`.
However, this test is not connector-specific, so dedicated class is more
appropriate.
JDBC's `ResultSet.getTimestamp(int)` cannot correctly return a `TIMESTAMP`
value that did not occur in local time zone (due to DST or policy
changes).  Similarly, `ResultSet.getTime(int)` cannot correctly return
`TIME` value, if that local time did not occur in local time zone on
1970-01-01.
…DATE

For this, `H2QueryRunner` needs to be able to convert a DATE value to
TIMESTAMP. It used to be able when `ResultSet.getTimestamp` was used to
retrieve the TIMESTAMP value, but this broke when Java Time classes were
used to retrieve values from the `ResultSet`.
@findepi findepi merged commit 50224d4 into prestodb:master Mar 9, 2018
@findepi findepi deleted the test-more-base-jdbc-and-dates branch March 9, 2018 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants