-
Notifications
You must be signed in to change notification settings - Fork 188
Support variable precision time timestamp #300
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
Merged
hashhar
merged 1 commit into
trinodb:master
from
lpoulain:support-variable-precision-time-timestamp
Dec 27, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -287,7 +287,7 @@ def test_datetime_query_param(trino_connection): | |
rows = cur.fetchall() | ||
|
||
assert rows[0][0] == params | ||
assert cur.description[0][1] == "timestamp" | ||
assert cur.description[0][1] == "timestamp(6)" | ||
|
||
|
||
def test_datetime_with_utc_time_zone_query_param(trino_connection): | ||
|
@@ -299,7 +299,7 @@ def test_datetime_with_utc_time_zone_query_param(trino_connection): | |
rows = cur.fetchall() | ||
|
||
assert rows[0][0] == params | ||
assert cur.description[0][1] == "timestamp with time zone" | ||
assert cur.description[0][1] == "timestamp(6) with time zone" | ||
|
||
|
||
def test_datetime_with_numeric_offset_time_zone_query_param(trino_connection): | ||
|
@@ -313,7 +313,7 @@ def test_datetime_with_numeric_offset_time_zone_query_param(trino_connection): | |
rows = cur.fetchall() | ||
|
||
assert rows[0][0] == params | ||
assert cur.description[0][1] == "timestamp with time zone" | ||
assert cur.description[0][1] == "timestamp(6) with time zone" | ||
|
||
|
||
def test_datetime_with_named_time_zone_query_param(trino_connection): | ||
|
@@ -325,7 +325,7 @@ def test_datetime_with_named_time_zone_query_param(trino_connection): | |
rows = cur.fetchall() | ||
|
||
assert rows[0][0] == params | ||
assert cur.description[0][1] == "timestamp with time zone" | ||
assert cur.description[0][1] == "timestamp(6) with time zone" | ||
|
||
|
||
def test_datetime_with_trailing_zeros(trino_connection): | ||
|
@@ -463,6 +463,7 @@ def test_time_query_param(trino_connection): | |
rows = cur.fetchall() | ||
|
||
assert rows[0][0] == params | ||
assert cur.description[0][1] == "time(6)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added similar assertion to |
||
|
||
|
||
def test_time_with_named_time_zone_query_param(trino_connection): | ||
|
@@ -492,6 +493,7 @@ def test_time(trino_connection): | |
rows = cur.fetchall() | ||
|
||
assert rows[0][0] == time(1, 2, 3, 456000) | ||
assert cur.description[0][1] == "time(3)" | ||
|
||
|
||
def test_null_time(trino_connection): | ||
|
@@ -512,6 +514,7 @@ def test_time_with_time_zone_negative_offset(trino_connection): | |
tz = timezone(-timedelta(hours=8, minutes=0)) | ||
|
||
assert rows[0][0] == time(1, 2, 3, 456000, tzinfo=tz) | ||
assert cur.description[0][1] == "time(3) with time zone" | ||
|
||
|
||
def test_time_with_time_zone_positive_offset(trino_connection): | ||
|
@@ -523,6 +526,7 @@ def test_time_with_time_zone_positive_offset(trino_connection): | |
tz = timezone(timedelta(hours=8, minutes=0)) | ||
|
||
assert rows[0][0] == time(1, 2, 3, 456000, tzinfo=tz) | ||
assert cur.description[0][1] == "time(3) with time zone" | ||
|
||
|
||
def test_null_date_with_time_zone(trino_connection): | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.