[ https://issues.apache.org/jira/browse/IGNITE-25045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pereslegin reassigned IGNITE-25045: ----------------------------------------- Assignee: Pavel Pereslegin > Sql. Time, Timestamp, Timestamp with local time zone. Insert/Update with cast > operation ignores target precision > ---------------------------------------------------------------------------------------------------------------- > > Key: IGNITE-25045 > URL: https://issues.apache.org/jira/browse/IGNITE-25045 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Maksim Zhuravkov > Assignee: Pavel Pereslegin > Priority: Major > Labels: ignite-3 > > Insert with CAST to timestamp with local time zone ignores target type > precision: > {code:java} > @Test > public void test() { > igniteSql().execute(null, "CREATE TABLE ts (id INT PRIMARY KEY, > ts_ltz TIMESTAMP(1) WITH LOCAL TIME ZONE)"); > assertQuery("INSERT INTO ts VALUES(1, TIMESTAMP WITH LOCAL TIME ZONE > '2001-01-01 18:00:00.333')") > .withTimeZoneId(ZoneId.of("Europe/Paris")) > .returnSomething() > .check(); > assertQuery("INSERT INTO ts VALUES(2, '2001-01-01 > 18:00:00.333'::TIMESTAMP WITH LOCAL TIME ZONE)") > .withTimeZoneId(ZoneId.of("Europe/Paris")) > .returnSomething() > .check(); > assertQuery("SELECT id, ts_ltz, ts_ltz::VARCHAR FROM ts ORDER BY id") > .returns(1, Instant.parse("2001-01-01T17:00:00.300Z"), > "2001-01-01 17:00:00.3 UTC") > .returns(2, Instant.parse("2001-01-01T17:00:00.300Z"), > "2001-01-01 17:00:00.3 UTC") > .check(); > } > {code} > Output: > {noformat} > org.opentest4j.AssertionFailedError: Collections are not equal (position 1): > Expected: 2001-01-01T17:00:00.300Z <class java.time.Instant> > Actual: 2001-01-01T17:00:00.333Z <class java.time.Instant> > {noformat} > P.S. There is no such issue with TIMESTAMP type. -- This message was sent by Atlassian Jira (v8.20.10#820010)