-
Notifications
You must be signed in to change notification settings - Fork 613
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
feat(frontend): cast/cmp with session timezone #7243
Merged
+650
−137
Merged
Changes from 35 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
3f004a8
commit
jon-chuang ebe08ef
stash
jon-chuang 99aac3a
fix
jon-chuang e97d28a
Merge branch 'jon/session_timezone' into jon/implicit_cast_with_sessi…
jon-chuang 6e14642
stash
jon-chuang 5dd7e9c
revert default
jon-chuang d42173e
Merge branch 'jon/session_timezone' into jon/implicit_cast_with_sessi…
jon-chuang e51dac8
stash
jon-chuang b9561bb
Merge branch 'main' of https://github.com/singularity-data/risingwave…
jon-chuang a6ff87e
commit
jon-chuang 1aa991d
minor
jon-chuang eef6e07
minor
jon-chuang f18d7b4
minor
jon-chuang 11f68cf
minor
jon-chuang 560b35f
stash
jon-chuang d57822c
Merge branch 'main' into jon/implicit_cast_with_session_timezone
jon-chuang 533288d
undo
jon-chuang 768af61
changes
jon-chuang b1e23e0
for all
jon-chuang 5e8207b
add dynamic filter test with timestamptz/timestamp - redundant as we …
jon-chuang 637b86b
add
jon-chuang 7a2bf8e
fix
jon-chuang 3245e97
fix
jon-chuang 2373b3f
add
jon-chuang 63aad62
stash
jon-chuang 9b19e7a
Merge branch 'main' of https://github.com/singularity-data/risingwave…
jon-chuang 1254a6d
fix scan conversion
jon-chuang 2544413
remove
jon-chuang 5d67d75
minor
jon-chuang a16d522
revert to UTC at end of test
jon-chuang 031ed37
fix kafka
jon-chuang b9ef349
planner tests, ignore slt
jon-chuang ceb80b3
Merge branch 'main' of https://github.com/singularity-data/risingwave…
jon-chuang af2b99f
minor
jon-chuang cffef1b
minor
jon-chuang 31b8a78
code review
jon-chuang e054d54
minor
jon-chuang 05a605e
add license
jon-chuang bb03a47
minor
jon-chuang f9ec0be
remove
jon-chuang 334bfd8
Merge branch 'main' into jon/implicit_cast_with_session_timezone
mergify[bot] 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
statement ok | ||
set timezone = "us/pacific"; | ||
|
||
# Cast date to timestamptz | ||
query T | ||
select '2022-01-01'::date::timestamp with time zone; | ||
---- | ||
2022-01-01 08:00:00+00:00 | ||
|
||
# Cast timestamp to timestamptz | ||
query T | ||
select '2022-01-01 00:00:00'::timestamp::timestamp with time zone; | ||
---- | ||
2022-01-01 08:00:00+00:00 | ||
|
||
# Cast timestamptz to timestamp | ||
query T | ||
select '2022-01-01 00:00:00+00:00'::timestamp with time zone::timestamp; | ||
---- | ||
2021-12-31 16:00:00 | ||
|
||
# Cast timestamptz to date | ||
query T | ||
select '2022-01-01 00:00:00+00:00'::timestamp with time zone::date; | ||
---- | ||
2021-12-31 | ||
|
||
# Cast timestamptz to time | ||
query T | ||
select '2022-01-01 00:00:00+00:00'::timestamp with time zone::time; | ||
---- | ||
16:00:00 | ||
|
||
# Compare timestamp with timestamptz | ||
query T | ||
select '2022-01-01 00:00:00-08:00'::timestamp with time zone = '2022-01-01 00:00:00'::timestamp; | ||
---- | ||
t | ||
|
||
# Compare date with timestamptz | ||
query T | ||
select '2022-01-01 00:00:00-08:00'::timestamp with time zone = '2022-01-01'::date; | ||
---- | ||
t | ||
|
||
# Cast varchar without timezone to timestamptz | ||
query T | ||
select '2022-01-01 00:00:00'::timestamp with time zone; | ||
---- | ||
2022-01-01 08:00:00+00:00 | ||
|
||
# Cast timestamptz to varchar, should display with timezone information | ||
query T | ||
select '2022-01-01 00:00:00-08:00'::timestamp with time zone::varchar; | ||
---- | ||
2022-01-01 00:00:00-08:00 | ||
|
||
statement ok | ||
set timezone = 'UTC'; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should display
2022-01-01 00:00:00-08:00
or2022-01-01 08:00:00+00:00
? Although they are equal.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be in an upcoming PR (depending on this PR). It will format Pg rows with the session timestamp.