ignite-3 icon indicating copy to clipboard operation
ignite-3 copied to clipboard

IGNITE-19274 Sql. Jdbc client time zone propagation

Open xtern opened this issue 1 year ago • 0 comments

https://issues.apache.org/jira/browse/IGNITE-19274

  1. Added jdbc connection property to set "session" time zone ('connectionTimeZone`)
  2. Added client time zone propagation to sql-engine in JdbcQueryEventHandler#connect(ZoneId)
  3. 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)

xtern avatar Apr 04 '24 17:04 xtern