-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
As uncovered in #19460, SELECT '2001-09-28'::date + interval '1 hour' returns a Date32 or Date64 type depending on the lhs type whereas other systems return a timestamp:
- https://www.postgresql.org/docs/current/functions-datetime.html
- https://duckdb.org/docs/stable/sql/data_types/interval#arithmetic-with-timestamps-dates-and-intervals
- https://dev.mysql.com/doc/refman/8.4/en/expressions.html#temporal-intervals
Datafusion should adhere to common conventions for operation types unless there is a really good reason to deviate.
IOW, this should work:
query T
SELECT arrow_typeof('2001-09-28'::date + interval '1 hour')
----
Timestamp(ns)To Reproduce
See above sql.
Expected behavior
date + type should return Timestamp, not date.
Additional context
No response
martin-g
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working