Skip to content

Can not compare durations and intervals #11891

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

(broken out from #11876 for more visibility)

@samuelcolvin writes:

We regularly want to allow queries of the form

SELECT * FROM records WHERE end_timestamp - start_timestamp > interval '2 seconds'

Until now that failed with

type_coercion: Cannot infer common argument type for comparison operation Duration(Microsecond) > Interval(MonthDayNano)

Describe the solution you'd like

The query should work

Describe alternatives you've considered

No response

Additional context

(broken out from #11876 for more visibility)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions