Julian Hyde created CALCITE-1630:
------------------------------------

             Summary: Support java.time values, per JDBC 4.2, and also Joda-Time
                 Key: CALCITE-1630
                 URL: https://issues.apache.org/jira/browse/CALCITE-1630
             Project: Calcite
          Issue Type: Bug
          Components: avatica
            Reporter: Julian Hyde


JDK 8 introduced the java.time package (based on 
[Joda-Time|http://www.joda.org/joda-time/]), and JDBC 4.2. The core JDBC 
interface is still based on the broken/confusing java.sql.Date, java.sql.Time, 
java.sql.Timestamp types, but has some support for java.time types:
* Instant is analogous to java.sql.Timestamp but has no direct mapping to a SQL 
type;
* Duration is somewhat similar to SQL's INTERVAL type;
* LocalDateTime is analogous to SQL's TIMESTAMP type;
* java.time.OffsetDateTime is analogous to SQL's TIMESTAMP WITH TIME ZONE type.

Also, we should support the same behavior on the corresponding Joda-Time types. 
(But let's do it without making Avatica depend on a particular version of 
Joda-Time. Could we use reflection and do it without adding Joda-Time as a 
dependency?)

See [an article about adding this support for 
PostgreSQL|https://developer.s24.com/blog/using-the-new-javatime-api-with-postgresql.html].



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to