ignite-3
ignite-3 copied to clipboard
IGNITE-19274 Sql. Jdbc client time zone propagation
https://issues.apache.org/jira/browse/IGNITE-19274
- Added jdbc connection property to set "session" time zone ('connectionTimeZone`)
- Added client time zone propagation to sql-engine in
JdbcQueryEventHandler#connect(ZoneId) - Fixed the conversion from TIMESTAMP to TIMESTAMP TZ (when milliseconds=0).
SELECT '2008-01-01 00:00:01'::TIMESTAMP::TIMESTAMP WITH LOCAL TIME ZONE
The result was:
Caused by: java.lang.IllegalArgumentException: 2008-01-01 00:00:01.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
at org.apache.calcite.util.TimestampString.normalize(TimestampString.java:129)
at org.apache.calcite.util.TimestampString.<init>(TimestampString.java:64)
at org.apache.calcite.util.TimestampWithTimeZoneString.<init>(TimestampWithTimeZoneString.java:54)
at org.apache.calcite.runtime.SqlFunctions.toTimestampWithLocalTimeZone(SqlFunctions.java:4446)