You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Arina Ielchiieva (JIRA)" <ji...@apache.org> on 2019/05/07 13:41:00 UTC

[jira] [Updated] (DRILL-7139) Date_add() can produce incorrect results when adding to a timestamp

     [ https://issues.apache.org/jira/browse/DRILL-7139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arina Ielchiieva updated DRILL-7139:
------------------------------------
    Reviewer: Igor Guzenko  (was: Volodymyr Vysotskyi)

> Date_add() can produce incorrect results when adding to a timestamp
> -------------------------------------------------------------------
>
>                 Key: DRILL-7139
>                 URL: https://issues.apache.org/jira/browse/DRILL-7139
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.15.0
>            Reporter: Robert Hou
>            Assignee: Dmytriy Grinchenko
>            Priority: Major
>             Fix For: 1.17.0
>
>
> I am using date_add() to create a sequence of timestamps:
> {noformat}
> select date_add(timestamp '1970-01-01 00:00:00', cast(concat('PT',107374,'M') as interval minute)) timestamp_id from (values(1));
> +--------------------------+
> |       timestamp_id       |
> +--------------------------+
> | 1970-01-25 20:31:12.704  |
> +--------------------------+
> 1 row selected (0.121 seconds)
> {noformat}
> When I add one more, I get an older timestamp:
> {noformat}
> select date_add(timestamp '1970-01-01 00:00:00', cast(concat('PT',107375,'M') as interval minute)) timestamp_id from (values(1));
> +--------------------------+
> |       timestamp_id       |
> +--------------------------+
> | 1969-12-07 03:29:25.408  |
> +--------------------------+
> 1 row selected (0.126 seconds)
> {noformat}



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