[ https://issues.apache.org/jira/browse/IGNITE-24934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pereslegin updated IGNITE-24934: -------------------------------------- Summary: Sql. Inconsistent behavior of the truncated TIME/TIMESTAMP value (was: Sql. The TIME/TIMESTAMP value is truncated without rounding.) > Sql. Inconsistent behavior of the truncated TIME/TIMESTAMP value > ---------------------------------------------------------------- > > Key: IGNITE-24934 > URL: https://issues.apache.org/jira/browse/IGNITE-24934 > Project: Ignite > Issue Type: Bug > Components: sql > Affects Versions: 3.0 > Reporter: Pavel Pereslegin > Priority: Major > Labels: ignite-3 > > The following test works fine > {code} > # Value must be rounded up. > query T > SELECT '2008-01-01 00:00:01.9995'::TIMESTAMP(3)::VARCHAR > ---- > 2008-01-01 00:00:02 > {code} > But the same example with precision = 2 > {code:java} > assertQuery("SELECT '2024-01-01 20:08:10.999'::TIMESTAMP(2)::VARCHAR") > .returns("2024-01-01 20:08:11") > .check(); > {code} > fails > {noformat} > Expected: 2024-01-01 20:08:11 <class java.lang.String> > Actual: 2024-01-01 20:08:10.99 <class java.lang.String> > {noformat} > The same is reproduced for TIME type also. > This issue may be related to IGNITE-24889. > Update: check the same behavior with numerics (eg 10.7::INT) and make it > consistent. -- This message was sent by Atlassian Jira (v8.20.10#820010)