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

TIMESTAMPADD(MICROSECOND, ...) returns incorrect results

    XMLWordPrintableJSON

Details

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

    Description

      Add this test to SqlOperatorBaseTest#testTimestampAdd :

      tester.checkScalar(
          "timestampadd(MICROSECOND, 2, timestamp '2016-02-24 12:42:25.000000')",
          "2016-02-24 12:42:25.000002",
          "TIMESTAMP(6) NOT NULL");

      SqlTimestampAddFunction has incorrect precision for MILLISECOND and MICROSECOND. Note that the parser does not allow for MILLISECOND as a time unit.

      Attachments

        1. CALCITE-2281.patch.txt
          3 kB
          Sudheesh Katkam

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              sudheeshkatkam Sudheesh Katkam
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: