You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2026/05/16 16:38:01 UTC

[I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Dandandan opened a new issue, #22265:
URL: https://github.com/apache/datafusion/issues/22265

   Split out from #22247.
   
   ### Mismatch
   
   `time + interval` should wrap within the 24-hour time domain.
   
   ```sql
   SELECT time '23:30' + interval '2 hours';
   ```
   
   PostgreSQL:
   
   ```text
   01:30:00
   ```
   
   DataFusion:
   
   ```text
   25 hours 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "Richard-Durkee (via GitHub)" <gi...@apache.org>.
Richard-Durkee commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4564525792

   untake


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "Richard-Durkee (via GitHub)" <gi...@apache.org>.
Richard-Durkee commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4564408663

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "vismaytiwari (via GitHub)" <gi...@apache.org>.
vismaytiwari commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4854823797

   Opened #23279 for this. `time + interval` now returns a wrapped `time` (`23:30 + 2h → 01:30`) instead of an interval, following the existing `Date - Date` handling. Open to feedback.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #22265: PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain
URL: https://github.com/apache/datafusion/issues/22265


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4477480497

   ```
   memory D SELECT time '23:30' + interval '2 hours';
   ┌───────────────────────────────────────────────────────┐
   │ (CAST('23:30' AS TIME) + CAST('2 hours' AS INTERVAL)) │
   │                         time                          │
   ├───────────────────────────────────────────────────────┤
   │ 01:30:00                                              │
   └───────────────────────────────────────────────────────┘
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "vismaytiwari (via GitHub)" <gi...@apache.org>.
vismaytiwari commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4854790076

   Couldn't resist — a "good first issue" that's secretly about teaching DataFusion what a 24-hour clock is 🙂 Opened #23279: `time + interval` now wraps within the day (`23:30 + 2h → 01:30`) instead of confidently answering `25 hours 30 mins`. I followed the existing `Date - Date` special case, so hopefully it feels at home in the codebase. Hope it's useful — and very open to feedback if I've missed an edge case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "tarekakrout2021 (via GitHub)" <gi...@apache.org>.
tarekakrout2021 commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4468047950

   untake


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] PostgreSQL compatibility: `time + interval` should wrap within the 24-hour time domain [datafusion]

Posted by "tarekakrout2021 (via GitHub)" <gi...@apache.org>.
tarekakrout2021 commented on issue #22265:
URL: https://github.com/apache/datafusion/issues/22265#issuecomment-4467955550

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org