You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Pereslegin (Jira)" <ji...@apache.org> on 2025/04/28 17:12:00 UTC
[jira] [Commented] (IGNITE-21589) Sql. Fix TIME +/- intervals arithmetic
[ https://issues.apache.org/jira/browse/IGNITE-21589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947893#comment-17947893 ]
Pavel Pereslegin commented on IGNITE-21589:
-------------------------------------------
Looks like this has been fixed in Calcite 1.38.
Related tests should be unmuted in IGNITE-24890.
Issue must be closed after IGNITE-24890 is closed.
> Sql. Fix TIME +/- intervals arithmetic
> --------------------------------------
>
> Key: IGNITE-21589
> URL: https://issues.apache.org/jira/browse/IGNITE-21589
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Pavel Pereslegin
> Priority: Major
> Labels: ignite-3
>
> There seems to be overflow when applying significant intervals to time.
> Reproducer
> {code:java}
> assertQuery("SELECT TIME '00:00:00' + interval (960) hour")
> .returns(LocalTime.parse("00:00:00"))
> .check();
> // Expected: 00:00 <class java.time.LocalTime>
> // Actual: 06:57:12.704 <class java.time.LocalTime>
> {code}
> Such overflow also occurs when adding/subtracting days.
> {code:sql}
> SELECT TIME '00:00:00.001'+ interval (29) Days
> -- Expected: 00:00:00.001 <class java.time.LocalTime>
> -- Actual: 06:57:12.705 <class java.time.LocalTime>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)