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

Rework calendar handling for time-based cols

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      This change makes is so that ResultSet#getDate(int) (and getTimestamp and getTime) is called on an underlying JDBC connection if no custom calendar is available, instead of calling ResultSet#getDate(int, Calendar) with a null Calendar (the latter causes NPEs in Phoenix, and possibly other JDBC drivers).

      In order to get this working, I had to make a number of changes to the OptiqAssert framework as well to allow supplying a custom Calendar. It seems that the HSQLDB ResultSet performs quite differently if you use getTimestamp(int) compared to getTimestamp(int, null). It seems like it would be more ideal to not make the changes to OptiqAssert, but I wasn't able to find a way around it (I'm assuming that this is a bug in HSQLDB).

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/pull/191
      Created by: gabrielreid
      Labels:
      Created at: Tue Mar 18 15:59:48 CET 2014
      State: closed

      Attachments

        Activity

          People

            Unassigned Unassigned
            github-import GitHub Import
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: