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

Issue #11959: TIMESTAMPTZ >= DATE #11987

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/function/cast_rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ static int64_t ImplicitCastUhugeint(const LogicalType &to) {
static int64_t ImplicitCastDate(const LogicalType &to) {
switch (to.id()) {
case LogicalTypeId::TIMESTAMP:
case LogicalTypeId::TIMESTAMP_TZ:
return TargetTypeCost(to);
default:
return -1;
Expand Down
8 changes: 8 additions & 0 deletions test/sql/function/timestamp/test_icu_datetrunc.test
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,11 @@ select date_trunc('minute', '2022-10-30 02:17:00+02'::TIMESTAMPTZ);
----
2022-10-30 02:17:00+02

# Comparisons to DATE
statement ok
set time zone 'UTC';

query I
select date_trunc('day', '2024-05-06 16:09:28+05:00'::timestamptz) >= '2024-05-06 17:19:18+05:20'::date as r
----
True