Skip to content

Support binary temporal coercion for Date64 and Timestamp types #8275

Description

@gruuya

Describe the bug

Even though Date64 can be cast into Timestamp inside arrow-cast, DataFusion doesn't allow this.

To Reproduce

select arrow_cast(now(), 'Date64') < arrow_cast('2022-02-02 02:02:02', 'Timestamp(Nanosecond, None)');
Error during planning: Cannot infer common argument type for comparison operation Date64 < Timestamp(Nanosecond, None)

Expected behavior

select arrow_cast(now(), 'Date64') < arrow_cast('2022-02-02 02:02:02', 'Timestamp(Nanosecond, None)');
+-------------------------------------+
| now() < Utf8("2022-02-02 02:02:02") |
+-------------------------------------+
| false                               |
+-------------------------------------+
1 row in set. Query took 0.019 seconds.

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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