Pavel Pereslegin created IGNITE-21589:
-----------------------------------------

             Summary: 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


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)

Reply via email to