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

TIMESTAMPADD(MICROSECOND, ...) returns incorrect results

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment