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

TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds not microseconds

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.16.0
    • Fix Version/s: 1.17.0, avatica-1.13.0
    • Component/s: core
    • Labels:
      None

      Description

      When calling TIMESTAMPADD with the first parameter SQL_TSI_FRAC_SECOND and the JDBC escape sequence, this gets interpreted as microseconds when it should be interpreted as nanoseconds.

       

      From the ODBC spec on MSDN:

      https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/time-date-and-interval-functions?view=sql-server-2017

      'where fractional seconds are expressed in billionths of a second.'

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                jduong James Duong
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: