Description
Let's take a look at case below:
sql("CREATE TABLE tmp (id INT PRIMARY KEY, s VARCHAR(100))"); sql("INSERT INTO tmp VALUES (1, '1970-01-01 12:00:00')"); ZoneId zone = ZoneOffset.ofHours(4); assertQuery("INSERT INTO test SELECT s FROM tmp WHERE id = 1") .withTimeZoneId(zone) .check(); assertQuery("SELECT * FROM test") .returns(Instant.parse("1970-01-01T08:00:00Z")) .check();
Although client which does INSERT with implicit cast from VARCHAR to TS WITH LOCAL TZ has zone offset of +4 hours, last query returns 1970-01-01T12:00:00Z.
Attachments
Issue Links
- blocks
-
IGNITE-22765 Sql. Improve optimization of simple inserts
- Resolved
- is related to
-
IGNITE-23277 Calcite. Wrong cast of VARCHAR to TIMESTAMP WITH LOCAL TIMEZONE
- Open
- links to