wnob opened a new pull request, #186:
URL: https://github.com/apache/calcite-avatica/pull/186

   According to the [JDBC 4.2 spec][1], the `TIME_WITH_TIMEZONE` and 
`TIMESTAMP_WITH_TIMEZONE` types are meant to be accessed as 
`java.time.OffsetTime` and `java.time.OffsetDateTime` objects respectively, via 
the `setObject` and `getObject` methods on result sets.
   
   This PR is meant to implement this proper behavior, as well as adding the 
convenience to use `getString` (returning ISO 8601-encoded strings) as well as 
`getTime` and `getTimestamp` respectively (returning the same point in time as 
a timezone-less `java.util.Date` derivative, as though it were a simple `TIME` 
or `TIMESTAMP` JDBC type).
   
   The PR will still require a bit of workshopping, but I wanted to get your 
eyes on it now in case you have any comments on the approach so far. In 
particular, I want to make sure that calling `setString` on one of the 
timezone-attached types does not require parsing the string, because I believe 
ISO 8601 is the most appropriate serialization format for these types. Does 
this mean, in `TypedValue.java`, that I must pick `String` as the "Local" 
representation for these types? It would seem to be counter to the stated 
intention of it being "used by Calcite for efficient computation".
   
   [1]: 
https://download.oracle.com/otn-pub/jcp/jdbc-4_2-mrel2-spec/jdbc4.2-fr-spec.pdf


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to