[
https://issues.apache.org/jira/browse/IGNITE-21589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Pereslegin updated IGNITE-21589:
--------------------------------------
Summary: Sql. Fix TIME interval arithmetic (was: Fix TIME interval
arithmetic)
> Sql. Fix TIME interval 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 occurs, for example, 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)