Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1630

Support java.time values, per JDBC 4.2, and also Joda-Time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • avatica
    • None

    Description

      JDK 8 introduced the java.time package (based on 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: