You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sudheesh Katkam (JIRA)" <ji...@apache.org> on 2018/04/26 00:26:00 UTC
[jira] [Created] (CALCITE-2281) TIMESTAMPADD(MICROSECOND, ...)
returns incorrect results
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)