Skip to content

extract(epoch from date) fails for Date32 and Date64 types #8694

Closed

Description

@Jefffrey

Describe the bug

Running in datafusion-cli

DataFusion CLI v34.0.0
❯ select extract(epoch from '2020-08-16'::date);
Optimizer rule 'simplify_expressions' failed
caused by
Internal error: Can not convert Date32 to epoch.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
❯

To Reproduce

No response

Expected behavior

Should get the number of seconds since Unix epoch

Additional context

No response

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