Skip to content

Supporting casts to timestamptz: Eq Utf8 of binary physical should be same" #5164

@alamb

Description

@alamb

Describe the bug
After #5140 and #5117 we can cast strings to Timestamp without a timezone. However, casting with timezone is not working yet, as noticed by @waitingkuo

To Reproduce
In datafusion-cli:

select '2000-01-01T00:00:00'::timestamp::timestamptz = '2000-01-01T00:00:00';
Internal("The type of Timestamp(Nanosecond, Some(\"+00:00\")) Eq Utf8 of binary physical should be same")
❯ select '2000-01-01T00:00:00'::timestamp = '2000-01-01T00:00:00';
+-----------------------------------------------------------+
| Utf8("2000-01-01T00:00:00") = Utf8("2000-01-01T00:00:00") |
+-----------------------------------------------------------+
| true                                                      |
+-----------------------------------------------------------+
1 row in set. Query took 0.004 seconds.
❯ select '2000-01-01T00:00:00'::timestamptz = '2000-01-01T00:00:00';
NotImplemented("Unsupported CAST from Utf8 to Timestamp(Nanosecond, Some(\"+00:00\"))")

Expected behavior
I expect all three queries to run and return true

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions