Sudheesh Katkam created CALCITE-2281:
----------------------------------------

             Summary: TIMESTAMPADD(MICROSECOND, ...) returns incorrect results
                 Key: CALCITE-2281
                 URL: https://issues.apache.org/jira/browse/CALCITE-2281
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Sudheesh Katkam
            Assignee: Julian Hyde


Add this test to {{SqlOperatorBaseTest#testTimestampAdd}} :
{code:java}
tester.checkScalar(
    "timestampadd(MICROSECOND, 2, timestamp '2016-02-24 12:42:25.000000')",
    "2016-02-24 12:42:25.000002",
    "TIMESTAMP(6) NOT NULL");{code}
{{[SqlTimestampAddFunction|https://github.com/apache/calcite/blob/8327e674e7f0a768d124fa37fd75cda4b8a35bb6/core/src/main/java/org/apache/calcite/sql/fun/SqlTimestampAddFunction.java#L68]}}
 has incorrect precision for MILLISECOND and MICROSECOND. Note that the parser 
does not allow for MILLISECOND as a time unit.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to