Skip to content

PostgreSQL compatibility: time - interval should wrap within the 24-hour time domain #22255

Closed

Description

@Dandandan

Split out from #22247.

Mismatch

time - interval should wrap within the 24-hour time domain.

SELECT time '01:30' - interval '2 hours';

PostgreSQL:

23:30:00

DataFusion:

-30 mins

Expected behavior

For PostgreSQL-compatible SQL semantics, DataFusion should either match PostgreSQL's result or raise the same class of domain/semantic error.

Activity

  1. raushanprabhakar1 commented on May 17, 2026

    @raushanprabhakar1
    Contributor

    take

  2. avneesh91 commented on Jun 15, 2026

    @avneesh91

    @raushanprabhakar1 / @Dandandan - Since it's been a few weeks, I'm going to take a shot at fixing this subtraction wrapping logic and opening a PR. Let me know if you're still working on it!

  3. avneesh91 commented on Jun 16, 2026

    @avneesh91

    ok it seems this PR -> #22280 solves both the addition as well as the subtraction!

  4. added a commit that references this issue on Jul 17, 2026
    1e58928
  5. added a commit that references this issue on Aug 12, 2026
    85ecd70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions