[
https://issues.apache.org/jira/browse/CALCITE-3615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde updated CALCITE-3615:
---------------------------------
Description:
According to the [JDBC
spec|https://download.oracle.com/otndocs/jcp/jdbc-4_2-mrel2-spec/index.html]
(section B.6, page 198), columns of type {{TIMESTAMP WITH TIME ZONE}} should
only be accessed via {{ResultSet.getObject()}} which should return a
[java.time.OffsetDatetime|https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/time/OffsetDateTime.html],
however in practice many clients may not handle this type strictly according
to spec.
The choice of result-set getter method is up to the client, not the driver, and
many clients may use {{getTimestamp}} or {{getString}} instead of
{{getObject}}, so in practice this may or may not have a timezone, and we
should support {{getTimestamp}} in the driver with proper timezone conversion
for clients that prefer a {{java.sql.Timestamp}} for simplicity.
was:According to the [JDBC
spec|https://download.oracle.com/otndocs/jcp/jdbc-4_2-mrel2-spec/index.html]
(section B.6, page 198), columns of type {{TIMESTAMP WITH TIME ZONE}} should
only be accessed via {{ResultSet.getObject()}} which should return a
[java.time.OffsetDatetime|https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/time/OffsetDateTime.html],
however in practice many clients may not handle this type strictly according
to spec.
> Improve JDBC driver to support java.time classes
> ------------------------------------------------
>
> Key: CALCITE-3615
> URL: https://issues.apache.org/jira/browse/CALCITE-3615
> Project: Calcite
> Issue Type: Sub-task
> Components: jdbc-adapter
> Reporter: Zhenghua Gao
> Priority: Major
>
> According to the [JDBC
> spec|https://download.oracle.com/otndocs/jcp/jdbc-4_2-mrel2-spec/index.html]
> (section B.6, page 198), columns of type {{TIMESTAMP WITH TIME ZONE}} should
> only be accessed via {{ResultSet.getObject()}} which should return a
> [java.time.OffsetDatetime|https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/time/OffsetDateTime.html],
> however in practice many clients may not handle this type strictly according
> to spec.
> The choice of result-set getter method is up to the client, not the driver,
> and many clients may use {{getTimestamp}} or {{getString}} instead of
> {{getObject}}, so in practice this may or may not have a timezone, and we
> should support {{getTimestamp}} in the driver with proper timezone conversion
> for clients that prefer a {{java.sql.Timestamp}} for simplicity.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)