Skip to content

Extract from interval type failed #6327

@comphead

Description

@comphead

Describe the bug

Extract from interval type failed in DF, but works in Postgres

To Reproduce

select extract( year from interval '5' year);
Error during planning: Coercion from [Utf8, Interval(MonthDayNano)] to the signature OneOf([Exact([Utf8, Date32]), Exact([Utf8, Date64]), Exact([Utf8, Timestamp(Second, None)]), Exact([Utf8, Timestamp(Microsecond, None)]), Exact([Utf8, Timestamp(Millisecond, None)]), Exact([Utf8, Timestamp(Nanosecond, None)]), Exact([Utf8, Timestamp(Nanosecond, Some("+00:00"))])]) failed.

Expected behavior

Query should work

Additional context

Found when reviewing #6312
Possibly related to #5806

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